ALP User Documentation  0.8.preview
Algebraic Programming User Documentation
ops.hpp
Go to the documentation of this file.
1 
2 /*
3  * Copyright 2021 Huawei Technologies Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
27 #ifndef _H_GRB_OPERATORS
28 #define _H_GRB_OPERATORS
29 
30 #include "internalops.hpp"
31 #include "type_traits.hpp"
32 
33 
34 namespace grb {
35 
40  namespace operators {
41 
54  template<
55  typename D1, typename D2 = D1, typename D3 = D2,
56  enum Backend implementation = config::default_backend
57  >
58  class left_assign :
59  public internal::Operator<
60  internal::left_assign< D1, D2, D3, implementation >
61  > {
62 
63  public:
64 
65  template< typename A, typename B, typename C, enum Backend D >
67 
68  left_assign() {}
69 
70  };
71 
81  template<
82  typename D1, typename D2 = D1, typename D3 = D2,
83  enum Backend implementation = config::default_backend
84  >
86  public internal::Operator<
87  internal::left_assign_if< D1, D2, D3, implementation >
88  > {
89 
90  public:
91 
92  template< typename A, typename B, typename C, enum Backend D >
94 
95  left_assign_if() {}
96 
97  };
98 
111  template<
112  typename D1, typename D2 = D1, typename D3 = D2,
113  enum Backend implementation = config::default_backend
114  >
115  class right_assign : public internal::Operator<
116  internal::right_assign< D1, D2, D3, implementation >
117  > {
118 
119  public:
120 
121  template< typename A, typename B, typename C, enum Backend D >
123 
124  right_assign() {}
125 
126  };
127 
137  template<
138  typename D1, typename D2 = D1, typename D3 = D2,
139  enum Backend implementation = config::default_backend
140  >
141  class right_assign_if : public internal::Operator<
142  internal::right_assign_if< D1, D2, D3, implementation >
143  > {
144 
145  public:
146 
147  template< typename A, typename B, typename C, enum Backend D >
149 
150  right_assign_if() {}
151 
152  };
153 
170  // [Operator Wrapping]
171  template<
172  typename D1, typename D2 = D1, typename D3 = D2,
173  enum Backend implementation = config::default_backend
174  >
175  class add : public internal::Operator<
176  internal::add< D1, D2, D3, implementation >
177  > {
178 
179  public:
180 
181  template< typename A, typename B, typename C, enum Backend D >
183 
184  add() {}
185  };
186  // [Operator Wrapping]
187 
204  template<
205  typename D1, typename D2 = D1, typename D3 = D2,
206  enum Backend implementation = config::default_backend
207  >
208  class mul : public internal::Operator<
209  internal::mul< D1, D2, D3, implementation >
210  > {
211 
212  public:
213 
214  template< typename A, typename B, typename C, enum Backend D >
216 
217  mul() {}
218  };
219 
237  template<
238  typename D1, typename D2 = D1, typename D3 = D2,
239  enum Backend implementation = config::default_backend
240  >
241  class max : public internal::Operator<
242  internal::max< D1, D2, D3, implementation >
243  > {
244 
245  public:
246 
247  template< typename A, typename B, typename C, enum Backend D >
249 
250  max() {}
251  };
252 
270  template<
271  typename D1, typename D2 = D1, typename D3 = D2,
272  enum Backend implementation = config::default_backend
273  >
274  class min : public internal::Operator<
275  internal::min< D1, D2, D3, implementation >
276  > {
277 
278  public:
279 
280  template< typename A, typename B, typename C, enum Backend D >
282 
283  min() {}
284  };
285 
297  template<
298  typename D1, typename D2 = D1, typename D3 = D2,
299  enum Backend implementation = config::default_backend
300  >
301  class subtract : public internal::Operator<
302  internal::substract< D1, D2, D3, implementation >
303  > {
304 
305  public:
306 
307  template< typename A, typename B, typename C, enum Backend D >
309 
310  subtract() {}
311  };
312 
324  template<
325  typename D1, typename D2 = D1, typename D3 = D2,
326  enum Backend implementation = config::default_backend
327  >
328  class divide : public internal::Operator<
329  internal::divide< D1, D2, D3, implementation >
330  > {
331 
332  public:
333 
334  template< typename A, typename B, typename C, enum Backend D >
336 
337  divide() {}
338  };
339 
349  template<
350  typename D1, typename D2 = D1, typename D3 = D2,
351  enum Backend implementation = config::default_backend
352  >
353  class divide_reverse : public internal::Operator<
354  internal::divide_reverse< D1, D2, D3, implementation >
355  > {
356 
357  public:
358 
359  template< typename A, typename B, typename C, enum Backend D >
361 
362  divide_reverse() {}
363  };
364 
375  template<
376  typename D1, typename D2 = D1, typename D3 = D2,
377  enum Backend implementation = config::default_backend
378  >
379  class equal : public internal::Operator<
380  internal::equal< D1, D2, D3, implementation >
381  > {
382 
383  public:
384 
385  template< typename A, typename B, typename C, enum Backend D >
387 
388  equal() {}
389  };
390 
401  template<
402  typename D1, typename D2 = D1, typename D3 = D2,
403  enum Backend implementation = config::default_backend
404  >
405  class not_equal : public internal::Operator<
406  internal::not_equal< D1, D2, D3, implementation >
407  > {
408 
409  public:
410 
411  template< typename A, typename B, typename C, enum Backend D >
413 
414  not_equal() {}
415  };
416 
430  template<
431  typename D1, typename D2 = D1, typename D3 = D2,
432  enum Backend implementation = config::default_backend
433  >
434  class any_or : public internal::Operator<
435  internal::any_or< D1, D2, D3, implementation >
436  > {
437 
438  public:
439 
440  template< typename A, typename B, typename C, enum Backend D >
442 
443  any_or() {}
444  };
445 
458  template<
459  typename D1, typename D2 = D1, typename D3 = D2,
460  enum Backend implementation = config::default_backend
461  >
462  class logical_or : public internal::Operator<
463  internal::logical_or< D1, D2, D3, implementation >
464  > {
465 
466  public:
467 
468  template< typename A, typename B, typename C, enum Backend D >
470 
471  logical_or() {}
472  };
473 
486  template<
487  typename D1, typename D2 = D1, typename D3 = D2,
488  enum Backend implementation = config::default_backend
489  >
490  class logical_and : public internal::Operator<
491  internal::logical_and< D1, D2, D3, implementation >
492  > {
493 
494  public:
495 
496  template< typename A, typename B, typename C, enum Backend D >
498 
499  logical_and() {}
500  };
501 
510  template<
511  typename D1, typename D2 = D1, typename D3 = D2,
512  enum Backend implementation = config::default_backend
513  >
514  class relu : public internal::Operator<
515  internal::relu< D1, D2, D3, implementation >
516  > {
517 
518  public:
519 
520  template< typename A, typename B, typename C, enum Backend D >
522 
523  relu() {}
524  };
525 
537  template<
538  typename D1, typename D2 = D1, typename D3 = D2,
539  enum Backend implementation = config::default_backend
540  >
541  class abs_diff : public internal::Operator<
542  internal::abs_diff< D1, D2, D3, implementation >
543  > {
544 
545  public:
546 
547  template< typename A, typename B, typename C, enum Backend D >
549 
550  abs_diff() {}
551 
552  };
553 
572  template< typename IType, typename VType >
573  class argmin : public internal::Operator< internal::argmin< IType, VType > > {
574 
575  public:
576 
577  argmin() {}
578 
579  };
580 
599  template< typename IType, typename VType >
600  class argmax : public internal::Operator< internal::argmax< IType, VType > > {
601 
602  public:
603 
604  argmax() {}
605 
606  };
607 
619  template<
620  typename D1, typename D2, typename D3,
621  enum Backend implementation = config::default_backend
622  >
623  class square_diff : public internal::Operator<
624  internal::square_diff< D1, D2, D3, implementation >
625  > {
626 
627  public:
628 
629  template< typename A, typename B, typename C, enum Backend D >
631 
632  square_diff() {}
633 
634  };
635 
645  template<
646  typename IN1, typename IN2,
647  enum Backend implementation = config::default_backend
648  >
649  class zip : public internal::Operator<
650  internal::zip< IN1, IN2, implementation >
651  > {
652 
653  public:
654 
655  template< typename A, typename B, enum Backend D >
657 
658  zip() {}
659 
660  };
661 
674  template<
675  typename D1, typename D2 = D1, typename D3 = D2,
676  enum Backend implementation = config::default_backend
677  >
678  class equal_first : public internal::Operator<
679  internal::equal_first< D1, D2, D3, implementation >
680  > {
681 
682  public:
683 
684  template< typename A, typename B, typename C, enum Backend D >
686 
687  equal_first() {}
688 
689  };
690 
703  template<
704  typename D1, typename D2 = D1, typename D3 = D2,
705  enum Backend implementation = config::default_backend
706  >
707  class less_than : public internal::Operator<
708  internal::lt< D1, D2, D3, implementation >
709  > {
710 
711  public:
712 
713  template< typename A, typename B, typename C, enum Backend D >
715 
716  less_than() {}
717 
718  };
719 
732  template<
733  typename D1, typename D2 = D1, typename D3 = D2,
734  enum Backend implementation = config::default_backend
735  >
736  class leq : public internal::Operator<
737  internal::leq< D1, D2, D3, implementation >
738  > {
739 
740  public:
741 
742  template< typename A, typename B, typename C, enum Backend D >
744 
745  leq() {}
746 
747  };
748 
761  template<
762  typename D1, typename D2 = D1, typename D3 = D2,
763  enum Backend implementation = config::default_backend
764  >
765  class greater_than: public internal::Operator<
766  internal::gt< D1, D2, D3, implementation >
767  > {
768 
769  public:
770 
771  template< typename A, typename B, typename C, enum Backend D >
773 
774  greater_than() {}
775 
776  };
777 
790  template<
791  typename D1, typename D2 = D1, typename D3 = D2,
792  enum Backend implementation = config::default_backend
793  >
794  class geq : public internal::Operator<
795  internal::geq< D1, D2, D3, implementation >
796  > {
797 
798  public:
799 
800  template< typename A, typename B, typename C, enum Backend D >
802 
803  geq() {}
804 
805  };
806 
863  template<
864  typename IN1, typename IN2, typename OUT, bool conj_left,
865  enum Backend implementation = config::default_backend
866  >
867  class conjugate_mul : public operators::internal::Operator<
868  internal::conjugate_mul< IN1, IN2, OUT, conj_left, implementation >
869  > {
870 
871  public:
872 
873  template< typename A, typename B, typename C, bool D, enum Backend E >
875 
876  conjugate_mul() {}
877 
878  };
879 
914  template<
915  typename IN1, typename IN2 = IN1, typename OUT = IN2,
916  enum Backend implementation = config::default_backend
917  >
918  class conjugate_right_mul : public operators::internal::Operator<
919  internal::conjugate_mul< IN1, IN2, OUT, false, implementation >
920  > {
921 
922  public:
923 
924  template< typename A, typename B, typename C, enum Backend D >
926 
928 
929  };
930 
965  template<
966  typename IN1, typename IN2 = IN1, typename OUT = IN2,
967  enum Backend implementation = config::default_backend
968  >
969  class conjugate_left_mul : public operators::internal::Operator<
970  internal::conjugate_mul< IN1, IN2, OUT, true, implementation >
971  > {
972 
973  public:
974 
975  template< typename A, typename B, typename C, enum Backend D >
977 
978  conjugate_left_mul() {}
979 
980  };
981 
982  } // namespace operators
983 
984  template< typename D1, typename D2, typename D3, enum Backend implementation >
985  struct is_operator< operators::left_assign_if< D1, D2, D3, implementation > > {
986  static const constexpr bool value = true;
987  };
988 
989  template< typename D1, typename D2, typename D3, enum Backend implementation >
990  struct is_operator< operators::right_assign_if< D1, D2, D3, implementation > > {
991  static const constexpr bool value = true;
992  };
993 
994  template< typename D1, typename D2, typename D3, enum Backend implementation >
995  struct is_operator< operators::left_assign< D1, D2, D3, implementation > > {
996  static const constexpr bool value = true;
997  };
998 
999  template< typename D1, typename D2, typename D3, enum Backend implementation >
1000  struct is_operator< operators::right_assign< D1, D2, D3, implementation > > {
1001  static const constexpr bool value = true;
1002  };
1003 
1004  // [Operator Type Traits]
1005  template< typename D1, typename D2, typename D3, enum Backend implementation >
1006  struct is_operator< operators::add< D1, D2, D3, implementation > > {
1007  static const constexpr bool value = true;
1008  };
1009  // [Operator Type Traits]
1010 
1011  template< typename D1, typename D2, typename D3, enum Backend implementation >
1012  struct is_operator< operators::mul< D1, D2, D3, implementation > > {
1013  static const constexpr bool value = true;
1014  };
1015 
1016  template< typename D1, typename D2, typename D3, enum Backend implementation >
1017  struct is_operator< operators::max< D1, D2, D3, implementation > > {
1018  static const constexpr bool value = true;
1019  };
1020 
1021  template< typename D1, typename D2, typename D3, enum Backend implementation >
1022  struct is_operator< operators::min< D1, D2, D3, implementation > > {
1023  static const constexpr bool value = true;
1024  };
1025 
1026  template< typename D1, typename D2, typename D3, enum Backend implementation >
1027  struct is_operator< operators::subtract< D1, D2, D3, implementation > > {
1028  static const constexpr bool value = true;
1029  };
1030 
1031  template< typename D1, typename D2, typename D3, enum Backend implementation >
1032  struct is_operator< operators::divide< D1, D2, D3, implementation > > {
1033  static const constexpr bool value = true;
1034  };
1035 
1036  template< typename D1, typename D2, typename D3, enum Backend implementation >
1037  struct is_operator< operators::divide_reverse< D1, D2, D3, implementation > > {
1038  static const constexpr bool value = true;
1039  };
1040 
1041  template< typename D1, typename D2, typename D3, enum Backend implementation >
1042  struct is_operator< operators::equal< D1, D2, D3, implementation > > {
1043  static const constexpr bool value = true;
1044  };
1045 
1046  template< typename D1, typename D2, typename D3, enum Backend implementation >
1047  struct is_operator< operators::not_equal< D1, D2, D3, implementation > > {
1048  static const constexpr bool value = true;
1049  };
1050 
1051  template< typename D1, typename D2, typename D3, enum Backend implementation >
1052  struct is_operator< operators::any_or< D1, D2, D3, implementation > > {
1053  static const constexpr bool value = true;
1054  };
1055 
1056  template< typename D1, typename D2, typename D3, enum Backend implementation >
1057  struct is_operator< operators::logical_or< D1, D2, D3, implementation > > {
1058  static const constexpr bool value = true;
1059  };
1060 
1061  template< typename D1, typename D2, typename D3, enum Backend implementation >
1062  struct is_operator< operators::logical_and< D1, D2, D3, implementation > > {
1063  static const constexpr bool value = true;
1064  };
1065 
1066  template< typename D1, typename D2, typename D3, enum Backend implementation >
1067  struct is_operator< operators::abs_diff< D1, D2, D3, implementation > > {
1068  static const constexpr bool value = true;
1069  };
1070 
1071  template< typename D1, typename D2, typename D3, enum Backend implementation >
1072  struct is_operator< operators::relu< D1, D2, D3, implementation > > {
1073  static const constexpr bool value = true;
1074  };
1075 
1076  template< typename IType, typename VType >
1077  struct is_operator< operators::argmin< IType, VType > > {
1078  static const constexpr bool value = true;
1079  };
1080 
1081  template< typename IType, typename VType >
1082  struct is_operator< operators::argmax< IType, VType > > {
1083  static const constexpr bool value = true;
1084  };
1085 
1086  template< typename D1, typename D2, typename D3, enum Backend implementation >
1087  struct is_operator< operators::square_diff< D1, D2, D3, implementation > > {
1088  static const constexpr bool value = true;
1089  };
1090 
1091  template< typename IN1, typename IN2, enum Backend implementation >
1092  struct is_operator< operators::zip< IN1, IN2, implementation > > {
1093  static const constexpr bool value = true;
1094  };
1095 
1096  template< typename D1, typename D2, typename D3, enum Backend implementation >
1097  struct is_operator< operators::equal_first< D1, D2, D3, implementation > > {
1098  static const constexpr bool value = true;
1099  };
1100 
1101  template< typename D1, typename D2, typename D3, enum Backend implementation >
1102  struct is_operator< operators::less_than< D1, D2, D3, implementation > > {
1103  static const constexpr bool value = true;
1104  };
1105 
1106  template< typename D1, typename D2, typename D3, enum Backend implementation >
1107  struct is_operator< operators::leq< D1, D2, D3, implementation > > {
1108  static const constexpr bool value = true;
1109  };
1110 
1111  template< typename D1, typename D2, typename D3, enum Backend implementation >
1112  struct is_operator< operators::greater_than< D1, D2, D3, implementation > > {
1113  static const constexpr bool value = true;
1114  };
1115 
1116  template< typename D1, typename D2, typename D3, enum Backend implementation >
1117  struct is_operator< operators::geq< D1, D2, D3, implementation > > {
1118  static const constexpr bool value = true;
1119  };
1120 
1121  template<
1122  typename D1, typename D2, typename D3,
1123  bool cl, enum Backend implementation
1124  >
1125  struct is_operator<
1126  operators::conjugate_mul< D1, D2, D3, cl, implementation >
1127  > {
1128  static const constexpr bool value = true;
1129  };
1130 
1131  template< typename D1, typename D2, typename D3, enum Backend implementation >
1132  struct is_operator<
1133  operators::conjugate_left_mul< D1, D2, D3, implementation >
1134  > {
1135  static const constexpr bool value = true;
1136  };
1137 
1138  template< typename D1, typename D2, typename D3, enum Backend implementation >
1139  struct is_operator<
1140  operators::conjugate_right_mul< D1, D2, D3, implementation >
1141  > {
1142  static const constexpr bool value = true;
1143  };
1144 
1145  template< typename D1, typename D2, typename D3 >
1146  struct is_idempotent< operators::min< D1, D2, D3 >, void > {
1147  static const constexpr bool value = true;
1148  };
1149 
1150  template< typename D1, typename D2, typename D3 >
1151  struct is_idempotent< operators::max< D1, D2, D3 >, void > {
1152  static const constexpr bool value = true;
1153  };
1154 
1155  template< typename D1, typename D2, typename D3 >
1156  struct is_idempotent< operators::any_or< D1, D2, D3 >, void > {
1157  static const constexpr bool value = true;
1158  };
1159 
1160  template< typename D1, typename D2, typename D3 >
1161  struct is_idempotent< operators::logical_or< D1, D2, D3 >, void > {
1162  static const constexpr bool value = true;
1163  };
1164 
1165  template< typename D1, typename D2, typename D3 >
1166  struct is_idempotent< operators::logical_and< D1, D2, D3 >, void > {
1167  static const constexpr bool value = true;
1168  };
1169 
1170  template< typename D1, typename D2, typename D3 >
1171  struct is_idempotent< operators::relu< D1, D2, D3 >, void > {
1172  static const constexpr bool value = true;
1173  };
1174 
1175  template< typename D1, typename D2, typename D3 >
1176  struct is_idempotent< operators::left_assign_if< D1, D2, D3 >, void > {
1177  static const constexpr bool value = true;
1178  };
1179 
1180  template< typename D1, typename D2, typename D3 >
1181  struct is_idempotent< operators::right_assign_if< D1, D2, D3 >, void > {
1182  static const constexpr bool value = true;
1183  };
1184 
1185  template< typename IType, typename VType >
1186  struct is_idempotent< operators::argmin< IType, VType >, void > {
1187  static const constexpr bool value = true;
1188  };
1189 
1190  template< typename IType, typename VType >
1191  struct is_idempotent< operators::argmax< IType, VType >, void > {
1192  static const constexpr bool value = true;
1193  };
1194 
1195  template< typename OP >
1196  struct is_associative<
1197  OP,
1198  typename std::enable_if< is_operator< OP >::value, void >::type
1199  > {
1200  static constexpr const bool value = OP::is_associative();
1201  };
1202 
1203  template< typename OP >
1204  struct is_commutative<
1205  OP,
1206  typename std::enable_if< is_operator< OP >::value, void >::type
1207  > {
1208  static constexpr const bool value = OP::is_commutative();
1209  };
1210 
1211  // internal type traits follow
1212 
1213  namespace internal {
1214 
1215  template< typename D1, typename D2, typename D3, enum Backend implementation >
1216  struct maybe_noop< operators::left_assign_if< D1, D2, D3, implementation > > {
1217  static const constexpr bool value = true;
1218  };
1219 
1220  template< typename D1, typename D2, typename D3, enum Backend implementation >
1221  struct maybe_noop< operators::right_assign_if< D1, D2, D3, implementation > > {
1222  static const constexpr bool value = true;
1223  };
1224 
1225  } // end namespace grb::internal
1226 
1227 } // end namespace grb
1228 
1229 #ifdef __DOXYGEN__
1230 
1235  #define _DEBUG_NO_IOSTREAM_PAIR_CONVERTER
1236 #endif
1237 
1238 #ifdef _DEBUG
1239  #ifndef _DEBUG_NO_IOSTREAM_PAIR_CONVERTER
1240 namespace std {
1241  template< typename U, typename V >
1242  std::ostream & operator<<( std::ostream &out, const std::pair< U, V > &pair ) {
1243  out << "( " << pair.first << ", " << pair.second << " )";
1244  return out;
1245  }
1246 } // end namespace std
1247  #endif
1248 #endif
1249 
1250 #endif // end ``_H_GRB_OPERATORS''
1251 
This operator is a generalisation of the logical or.
Definition: ops.hpp:434
This operation returns whether the left operand compares less-than the right operand.
Definition: ops.hpp:707
static const constexpr bool value
Whether T is commutative.
Definition: type_traits.hpp:246
Operator that returns false whenever its inputs compare equal, and true otherwise.
Definition: ops.hpp:405
The argmax operator on key-value pairs.
Definition: ops.hpp:600
Numerical substraction of two numbers.
Definition: ops.hpp:301
Conjugate-multiply operator that conjugates the left-hand operand before multiplication.
Definition: ops.hpp:969
Compares std::pair inputs taking the first entry in every pair as the comparison key,...
Definition: ops.hpp:678
Operator which returns true if its inputs compare equal, and false otherwise.
Definition: ops.hpp:379
Conjugate-multiply operator that conjugates the left- or right-hand operand before multiplication.
Definition: ops.hpp:867
This operation returns whether the left operand compares less-than or equal to the right operand.
Definition: ops.hpp:736
This operator multiplies the two input parameters and writes the result to the output variable.
Definition: ops.hpp:208
static const constexpr bool value
Wheter T is idempotent.
Definition: type_traits.hpp:167
This operation returns whether the left operand compares greater-than or equal to the right operand.
Definition: ops.hpp:794
The zip operator that operators on keys as a left-hand input and values as a right hand input,...
Definition: ops.hpp:649
This operator assigns the left-hand input if the right-hand input evaluates true.
Definition: ops.hpp:85
This operation returns whether the left operand compares greater-than the right operand.
Definition: ops.hpp:765
Conjugate-multiply operator that conjugates the right-hand operand before multiplication.
Definition: ops.hpp:918
This operation returns the squared difference between two numbers.
Definition: ops.hpp:623
This operator assigns the right-hand input if the left-hand input evaluates true.
Definition: ops.hpp:141
This operator takes the maximum of the two input parameters and writes the result to the output varia...
Definition: ops.hpp:241
This operator takes the minimum of the two input parameters and writes the result to the output varia...
Definition: ops.hpp:274
This operator discards all left-hand side input and simply copies the right-hand side input to the ou...
Definition: ops.hpp:115
Backend
A collection of all backends.
Definition: backends.hpp:49
Reversed division of two numbers.
Definition: ops.hpp:353
RC zip(Matrix< OutputType, backend, RIT, CIT, NIT > &A, const Vector< InputType1, backend, Coords > &x, const Vector< InputType2, backend, Coords > &y, const Vector< InputType3, backend, Coords > &z, const Phase &phase=EXECUTE)
The grb::zip merges three vectors into a matrix.
Definition: blas3.hpp:183
Specifies the ALP algebraic type traits.
static const constexpr bool value
Whether T is an ALP operator.
Definition: type_traits.hpp:111
This operator takes the sum of the two input parameters and writes it to the output variable.
Definition: ops.hpp:175
The ALP/GraphBLAS namespace.
Definition: graphblas.hpp:477
Numerical division of two numbers.
Definition: ops.hpp:328
The logical and.
Definition: ops.hpp:490
The argmin operator on key-value pairs.
Definition: ops.hpp:573
The logical or.
Definition: ops.hpp:462
Used to inspect whether a given type is an ALP operator.
Definition: type_traits.hpp:104
This operator discards all right-hand side input and simply copies the left-hand side input to the ou...
Definition: ops.hpp:58
static const constexpr bool value
Whether T is associative.
Definition: type_traits.hpp:208
This operator returns the absolute difference between two numbers.
Definition: ops.hpp:541
This operation is equivalent to grb::operators::min.
Definition: ops.hpp:514