27 #ifndef _H_GRB_BLAS2_BASE 28 #define _H_GRB_BLAS2_BASE 33 #include <graphblas/blas1.hpp> 238 typename IOType,
typename InputType1,
typename InputType2,
239 typename InputType3,
typename InputType4,
240 typename Coords,
typename RIT,
typename CIT,
typename NIT,
251 const typename std::enable_if<
258 void >::type *
const =
nullptr 261 std::cerr <<
"Selected backend does not implement mxv " 262 <<
"(doubly-masked, semiring)\n";
265 const bool selected_backed_does_not_support_doubly_masked_mxv_sr =
false;
266 assert( selected_backed_does_not_support_doubly_masked_mxv_sr );
302 typename IOType,
typename InputType1,
typename InputType2,
303 typename InputType3,
typename InputType4,
304 typename Coords,
typename RIT,
typename CIT,
typename NIT,
315 typename std::enable_if<
322 void >::type * =
nullptr 325 std::cerr <<
"Selected backend does not implement doubly-masked grb::vxm\n";
328 const bool selected_backend_does_not_support_doubly_masked_vxm_sr =
false;
329 assert( selected_backend_does_not_support_doubly_masked_vxm_sr );
435 typename Func,
typename DataType,
436 typename RIT,
typename CIT,
typename NIT,
437 Backend implementation = config::default_backend,
446 std::cerr <<
"Selected backend does not implement grb::eWiseLambda (matrices)\n";
449 const bool selected_backend_does_not_support_matrix_eWiseLamba =
false;
450 assert( selected_backend_does_not_support_matrix_eWiseLamba );
474 typename IOType,
typename InputType1,
typename InputType2,
476 typename RIT,
typename CIT,
typename NIT,
478 enum Backend implementation = config::default_backend
485 const Ring &ring = Ring(),
487 typename std::enable_if<
489 void >::type * =
nullptr 492 std::cerr <<
"Selected backend does not implement grb::mxv (output-masked)\n";
495 const bool backend_does_not_support_output_masked_mxv =
false;
496 assert( backend_does_not_support_output_masked_mxv );
521 typename IOType,
typename InputType1,
typename InputType2,
522 typename Coords,
typename RIT,
typename CIT,
typename NIT,
523 Backend implementation = config::default_backend
530 typename std::enable_if<
535 std::cerr <<
"Selected backend does not implement grb::mxv\n";
538 const bool backend_does_not_support_mxv =
false;
539 assert( backend_does_not_support_mxv );
563 typename IOType,
typename InputType1,
typename InputType2,
565 typename Coords,
typename RIT,
typename CIT,
typename NIT,
566 enum Backend implementation = config::default_backend
573 const Ring &ring = Ring(),
575 typename std::enable_if<
580 std::cerr <<
"Selected backend does not implement grb::vxm (output-masked)\n";
583 const bool selected_backend_does_not_support_output_masked_vxm =
false;
584 assert( selected_backend_does_not_support_output_masked_vxm );
610 typename IOType,
typename InputType1,
typename InputType2,
611 typename Coords,
typename RIT,
typename CIT,
typename NIT,
612 enum Backend implementation = config::default_backend
618 const Ring &ring = Ring(),
620 typename std::enable_if<
625 std::cerr <<
"Selected backend does not implement grb::vxm\n";
628 const bool selected_backend_does_not_support_vxm =
false;
629 assert( selected_backend_does_not_support_vxm );
653 class AdditiveMonoid,
class MultiplicativeOperator,
654 typename IOType,
typename InputType1,
typename InputType2,
655 typename InputType3,
typename InputType4,
656 typename Coords,
typename RIT,
typename CIT,
typename NIT,
665 const AdditiveMonoid &add = AdditiveMonoid(),
666 const MultiplicativeOperator &mul = MultiplicativeOperator(),
668 const typename std::enable_if<
676 !std::is_same< InputType2, void >::value,
677 void >::type *
const =
nullptr 680 std::cerr <<
"Selected backend does not implement vxm (doubly-masked)\n";
683 const bool selected_backed_does_not_support_doubly_masked_vxm =
false;
684 assert( selected_backed_does_not_support_doubly_masked_vxm );
711 class AdditiveMonoid,
class MultiplicativeOperator,
712 typename IOType,
typename InputType1,
typename InputType2,
713 typename InputType3,
typename InputType4,
714 typename Coords,
typename RIT,
typename CIT,
typename NIT,
723 const AdditiveMonoid &add = AdditiveMonoid(),
724 const MultiplicativeOperator &mul = MultiplicativeOperator(),
726 const typename std::enable_if<
734 !std::is_same< InputType2,
735 void >::value,
void >::type *
const =
nullptr 738 std::cerr <<
"Selected backend does not implement mxv (doubly-masked)\n";
741 const bool selected_backed_does_not_support_doubly_masked_mxv =
false;
742 assert( selected_backed_does_not_support_doubly_masked_mxv );
769 class AdditiveMonoid,
class MultiplicativeOperator,
770 typename IOType,
typename InputType1,
typename InputType2,
772 typename Coords,
typename RIT,
typename CIT,
typename NIT,
780 const AdditiveMonoid & add = AdditiveMonoid(),
781 const MultiplicativeOperator & mul = MultiplicativeOperator(),
783 const typename std::enable_if<
790 !std::is_same< InputType2, void >::value,
791 void >::type *
const =
nullptr 794 std::cerr <<
"Selected backend does not implement " 795 <<
"singly-masked monoid-op mxv\n";
798 const bool selected_backed_does_not_support_masked_monop_mxv =
false;
799 assert( selected_backed_does_not_support_masked_monop_mxv );
825 class AdditiveMonoid,
class MultiplicativeOperator,
826 typename IOType,
typename InputType1,
typename InputType2,
827 typename Coords,
typename RIT,
typename CIT,
typename NIT,
834 const AdditiveMonoid &add = AdditiveMonoid(),
835 const MultiplicativeOperator &mul = MultiplicativeOperator(),
837 const typename std::enable_if<
843 !std::is_same< InputType2, void >::value,
844 void >::type *
const =
nullptr 847 std::cerr <<
"Selected backend does not implement vxm " 848 <<
"(unmasked, monoid-op version )\n";
851 const bool selected_backed_does_not_support_monop_vxm =
false;
852 assert( selected_backed_does_not_support_monop_vxm );
877 class AdditiveMonoid,
class MultiplicativeOperator,
878 typename IOType,
typename InputType1,
typename InputType2,
880 typename Coords,
typename RIT,
typename CIT,
typename NIT,
888 const AdditiveMonoid &add = AdditiveMonoid(),
889 const MultiplicativeOperator &mul = MultiplicativeOperator(),
891 typename std::enable_if<
897 !std::is_same< InputType2, void >::value,
898 void >::type * =
nullptr 901 std::cerr <<
"Selected backend does not implement grb::vxm (output-masked)\n";
904 const bool selected_backed_does_not_support_masked_monop_vxm =
false;
905 assert( selected_backed_does_not_support_masked_monop_vxm );
931 class AdditiveMonoid,
class MultiplicativeOperator,
932 typename IOType,
typename InputType1,
typename InputType2,
933 typename Coords,
typename RIT,
typename CIT,
typename NIT,
940 const AdditiveMonoid &add = AdditiveMonoid(),
941 const MultiplicativeOperator &mul = MultiplicativeOperator(),
943 const typename std::enable_if<
949 !std::is_same< InputType2, void >::value,
950 void >::type *
const =
nullptr 953 std::cerr <<
"Selected backend does not implement grb::mxv (unmasked)\n";
956 const bool selected_backed_does_not_support_monop_mxv =
false;
957 assert( selected_backed_does_not_support_monop_mxv );
971 #endif // end _H_GRB_BLAS2_BASE Defines the ALP error codes.
This file contains a register of all backends that are either implemented, under implementation,...
An ALP/GraphBLAS matrix.
Definition: matrix.hpp:72
RC
Return codes of ALP primitives.
Definition: rc.hpp:47
A GraphBLAS vector.
Definition: vector.hpp:64
Specifies the ALP/GraphBLAS matrix container.
Used to inspect whether a given type is an ALP monoid.
Definition: type_traits.hpp:85
Speculatively assumes that the output container of the requested operation has enough capacity to com...
Definition: phase.hpp:257
Used to inspect whether a given type is an ALP semiring.
Definition: type_traits.hpp:66
Used to inspect whether a given type is an ALP/GraphBLAS object.
Definition: type_traits.hpp:130
Phase
Primitives with sparse ALP/GraphBLAS output containers may run into the issue where an appropriate gr...
Definition: phase.hpp:152
static constexpr Descriptor no_operation
Indicates no additional pre- or post-processing on any of the GraphBLAS function arguments.
Definition: descriptors.hpp:63
unsigned int Descriptor
Descriptors indicate pre- or post-processing for some or all of the arguments to an ALP/GraphBLAS cal...
Definition: descriptors.hpp:54
Defines all ALP/GraphBLAS descriptors.
RC vxm(Vector< IOType, backend, Coords > &u, const Vector< InputType3, backend, Coords > &u_mask, const Vector< InputType1, backend, Coords > &v, const Vector< InputType4, backend, Coords > &v_mask, const Matrix< InputType2, backend, RIT, CIT, NIT > &A, const Semiring &semiring=Semiring(), const Phase &phase=EXECUTE, typename std::enable_if< grb::is_semiring< Semiring >::value &&!grb::is_object< InputType1 >::value &&!grb::is_object< InputType2 >::value &&!grb::is_object< InputType3 >::value &&!grb::is_object< InputType4 >::value &&!grb::is_object< IOType >::value, void >::type *=nullptr)
Left-handed in-place doubly-masked sparse matrix times vector multiplication, .
Definition: blas2.hpp:307
Indicates that the execution of the requested primitive with the given arguments is not supported by ...
Definition: rc.hpp:129
RC mxv(Vector< IOType, backend, Coords > &u, const Vector< InputType3, backend, Coords > &u_mask, const Matrix< InputType2, backend, RIT, CIT, NIT > &A, const Vector< InputType1, backend, Coords > &v, const Vector< InputType4, backend, Coords > &v_mask, const Semiring &semiring=Semiring(), const Phase &phase=EXECUTE, const typename std::enable_if< grb::is_semiring< Semiring >::value &&!grb::is_object< IOType >::value &&!grb::is_object< InputType1 >::value &&!grb::is_object< InputType2 >::value &&!grb::is_object< InputType3 >::value &&!grb::is_object< InputType4 >::value, void >::type *const =nullptr)
Right-handed in-place doubly-masked sparse matrix times vector multiplication, .
Definition: blas2.hpp:243
Backend
A collection of all backends.
Definition: backends.hpp:49
The ALP/GraphBLAS namespace.
Definition: graphblas.hpp:477
Specifies the ALP/GraphBLAS vector container.
Provides an ALP semiring.
Defines both configuration parameters effective for all backends, as well as defines structured ways ...
RC eWiseLambda(const Func f, const Vector< DataType, backend, Coords > &x, Args...)
Executes an arbitrary element-wise user-defined function f on any number of vectors of equal length.
Definition: blas1.hpp:3746
A generalised semiring.
Definition: semiring.hpp:190
Used to inspect whether a given type is an ALP operator.
Definition: type_traits.hpp:104