16#ifndef __LEGION_REDOP_H__
17#define __LEGION_REDOP_H__
30#ifdef LEGION_REDOP_COMPLEX
31#ifdef LEGION_REDOP_HALF
34#include "mathtypes/complex.h"
37#ifdef LEGION_REDOP_HALF
38#include "mathtypes/half.h"
41#if defined(__HIP__) && defined(REALM_USE_HIP)
42#include "hip_cuda_compat/hip_cuda.h"
43#include "realm/hip/hiphijack_api.h"
60 static constexpr bool identity =
false;
61 static constexpr int REDOP_ID = LEGION_REDOP_OR_BOOL;
63 template<
bool EXCLUSIVE>
64 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
65 template<
bool EXCLUSIVE>
66 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
75 static constexpr int8_t identity = 0;
76 static constexpr int REDOP_ID = LEGION_REDOP_SUM_INT8;
78 template<
bool EXCLUSIVE>
79 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
80 template<
bool EXCLUSIVE>
81 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
90 static constexpr int16_t identity = 0;
91 static constexpr int REDOP_ID = LEGION_REDOP_SUM_INT16;
93 template<
bool EXCLUSIVE>
94 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
95 template<
bool EXCLUSIVE>
96 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
105 static constexpr int32_t identity = 0;
106 static constexpr int REDOP_ID = LEGION_REDOP_SUM_INT32;
108 template<
bool EXCLUSIVE>
109 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
110 template<
bool EXCLUSIVE>
111 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
120 static constexpr int64_t identity = 0;
121 static constexpr int REDOP_ID = LEGION_REDOP_SUM_INT64;
123 template<
bool EXCLUSIVE>
124 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
125 template<
bool EXCLUSIVE>
126 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
135 static constexpr uint8_t identity = 0;
136 static constexpr int REDOP_ID = LEGION_REDOP_SUM_UINT8;
138 template<
bool EXCLUSIVE>
139 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
140 template<
bool EXCLUSIVE>
141 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
147 typedef uint16_t LHS;
148 typedef uint16_t RHS;
150 static constexpr uint16_t identity = 0;
151 static constexpr int REDOP_ID = LEGION_REDOP_SUM_UINT16;
153 template<
bool EXCLUSIVE>
154 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
155 template<
bool EXCLUSIVE>
156 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
162 typedef uint32_t LHS;
163 typedef uint32_t RHS;
165 static constexpr uint32_t identity = 0;
166 static constexpr int REDOP_ID = LEGION_REDOP_SUM_UINT32;
168 template<
bool EXCLUSIVE>
169 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
170 template<
bool EXCLUSIVE>
171 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
177 typedef uint64_t LHS;
178 typedef uint64_t RHS;
180 static constexpr uint64_t identity = 0;
181 static constexpr int REDOP_ID = LEGION_REDOP_SUM_UINT64;
183 template<
bool EXCLUSIVE>
184 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
185 template<
bool EXCLUSIVE>
186 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
189#ifdef LEGION_REDOP_HALF
196 static inline const __half identity = __half(0,
false );
197 static constexpr int REDOP_ID = LEGION_REDOP_SUM_FLOAT16;
199 template<
bool EXCLUSIVE>
200 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
201 template<
bool EXCLUSIVE>
202 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
212 static constexpr float identity = 0.f;
213 static constexpr int REDOP_ID = LEGION_REDOP_SUM_FLOAT32;
215 template<
bool EXCLUSIVE>
216 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
217 template<
bool EXCLUSIVE>
218 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
227 static constexpr double identity = 0.0;
228 static constexpr int REDOP_ID = LEGION_REDOP_SUM_FLOAT64;
230 template<
bool EXCLUSIVE>
231 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
232 template<
bool EXCLUSIVE>
233 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
236#ifdef LEGION_REDOP_COMPLEX
237#ifdef LEGION_REDOP_HALF
241 typedef complex<__half> LHS;
242 typedef complex<__half> RHS;
244 static inline const complex<__half> identity =
245 complex<__half>(__half(0,
false ), __half(0,
false ));
246 static constexpr int REDOP_ID = LEGION_REDOP_SUM_COMPLEX32;
248 template<
bool EXCLUSIVE>
249 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
250 template<
bool EXCLUSIVE>
251 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
256 class SumReduction<complex<float> > {
258 typedef complex<float> LHS;
259 typedef complex<float> RHS;
261 static inline const complex<float> identity = complex<float>(0.f, 0.f);
262 static constexpr int REDOP_ID = LEGION_REDOP_SUM_COMPLEX64;
264 template<
bool EXCLUSIVE>
265 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
266 template<
bool EXCLUSIVE>
267 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
275 class SumReduction<complex<double> > {
277 typedef complex<double> LHS;
278 typedef complex<double> RHS;
280 static inline const complex<double> identity = complex<double>(0.0, 0.0);
281 static constexpr int REDOP_ID = LEGION_REDOP_SUM_COMPLEX128;
283 template<
bool EXCLUSIVE>
284 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
285 template<
bool EXCLUSIVE>
286 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
302 static constexpr int8_t identity = 0;
303 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_INT8;
305 template<
bool EXCLUSIVE>
306 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
307 template<
bool EXCLUSIVE>
308 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
317 static constexpr int16_t identity = 0;
318 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_INT16;
320 template<
bool EXCLUSIVE>
321 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
322 template<
bool EXCLUSIVE>
323 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
332 static constexpr int32_t identity = 0;
333 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_INT32;
335 template<
bool EXCLUSIVE>
336 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
337 template<
bool EXCLUSIVE>
338 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
347 static constexpr int64_t identity = 0;
348 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_INT64;
350 template<
bool EXCLUSIVE>
351 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
352 template<
bool EXCLUSIVE>
353 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
362 static constexpr uint8_t identity = 0;
363 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_UINT8;
365 template<
bool EXCLUSIVE>
366 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
367 template<
bool EXCLUSIVE>
368 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
374 typedef uint16_t LHS;
375 typedef uint16_t RHS;
377 static constexpr uint16_t identity = 0;
378 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_UINT16;
380 template<
bool EXCLUSIVE>
381 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
382 template<
bool EXCLUSIVE>
383 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
389 typedef uint32_t LHS;
390 typedef uint32_t RHS;
392 static constexpr uint32_t identity = 0;
393 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_UINT32;
395 template<
bool EXCLUSIVE>
396 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
397 template<
bool EXCLUSIVE>
398 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
404 typedef uint64_t LHS;
405 typedef uint64_t RHS;
407 static constexpr uint64_t identity = 0;
408 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_UINT64;
410 template<
bool EXCLUSIVE>
411 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
412 template<
bool EXCLUSIVE>
413 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
416#ifdef LEGION_REDOP_HALF
423 static inline const __half identity = __half(0,
false );
424 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_FLOAT16;
426 template<
bool EXCLUSIVE>
427 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
428 template<
bool EXCLUSIVE>
429 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
439 static constexpr float identity = 0.f;
440 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_FLOAT32;
442 template<
bool EXCLUSIVE>
443 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
444 template<
bool EXCLUSIVE>
445 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
454 static constexpr double identity = 0.0;
455 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_FLOAT64;
457 template<
bool EXCLUSIVE>
458 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
459 template<
bool EXCLUSIVE>
460 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
463#ifdef LEGION_REDOP_COMPLEX
464#ifdef LEGION_REDOP_HALF
468 typedef complex<__half> LHS;
469 typedef complex<__half> RHS;
471 static inline const complex<__half> identity =
472 complex<__half>(__half(0,
false ), __half(0,
false ));
473 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_COMPLEX32;
475 template<
bool EXCLUSIVE>
476 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
477 template<
bool EXCLUSIVE>
478 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
483 class DiffReduction<complex<float> > {
485 typedef complex<float> LHS;
486 typedef complex<float> RHS;
488 static inline const complex<float> identity = complex<float>(0.f, 0.f);
489 static constexpr int REDOP_ID = LEGION_REDOP_DIFF_COMPLEX64;
491 template<
bool EXCLUSIVE>
492 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
493 template<
bool EXCLUSIVE>
494 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
510 static constexpr bool identity =
true;
511 static constexpr int REDOP_ID = LEGION_REDOP_AND_BOOL;
513 template<
bool EXCLUSIVE>
514 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
515 template<
bool EXCLUSIVE>
516 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
525 static constexpr int8_t identity = 1;
526 static constexpr int REDOP_ID = LEGION_REDOP_PROD_INT8;
528 template<
bool EXCLUSIVE>
529 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
530 template<
bool EXCLUSIVE>
531 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
540 static constexpr int16_t identity = 1;
541 static constexpr int REDOP_ID = LEGION_REDOP_PROD_INT16;
543 template<
bool EXCLUSIVE>
544 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
545 template<
bool EXCLUSIVE>
546 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
555 static constexpr int32_t identity = 1;
556 static constexpr int REDOP_ID = LEGION_REDOP_PROD_INT32;
558 template<
bool EXCLUSIVE>
559 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
560 template<
bool EXCLUSIVE>
561 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
570 static constexpr int64_t identity = 1;
571 static constexpr int REDOP_ID = LEGION_REDOP_PROD_INT64;
573 template<
bool EXCLUSIVE>
574 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
575 template<
bool EXCLUSIVE>
576 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
585 static constexpr uint8_t identity = 1;
586 static constexpr int REDOP_ID = LEGION_REDOP_PROD_UINT8;
588 template<
bool EXCLUSIVE>
589 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
590 template<
bool EXCLUSIVE>
591 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
597 typedef uint16_t LHS;
598 typedef uint16_t RHS;
600 static constexpr uint16_t identity = 1;
601 static constexpr int REDOP_ID = LEGION_REDOP_PROD_UINT16;
603 template<
bool EXCLUSIVE>
604 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
605 template<
bool EXCLUSIVE>
606 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
612 typedef uint32_t LHS;
613 typedef uint32_t RHS;
615 static constexpr uint32_t identity = 1;
616 static constexpr int REDOP_ID = LEGION_REDOP_PROD_UINT32;
618 template<
bool EXCLUSIVE>
619 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
620 template<
bool EXCLUSIVE>
621 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
627 typedef uint64_t LHS;
628 typedef uint64_t RHS;
630 static constexpr uint64_t identity = 1;
631 static constexpr int REDOP_ID = LEGION_REDOP_PROD_UINT64;
633 template<
bool EXCLUSIVE>
634 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
635 template<
bool EXCLUSIVE>
636 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
639#ifdef LEGION_REDOP_HALF
646 static inline const __half identity = __half(1,
false );
647 static constexpr int REDOP_ID = LEGION_REDOP_PROD_FLOAT16;
649 template<
bool EXCLUSIVE>
650 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
651 template<
bool EXCLUSIVE>
652 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
662 static constexpr float identity = 1.f;
663 static constexpr int REDOP_ID = LEGION_REDOP_PROD_FLOAT32;
665 template<
bool EXCLUSIVE>
666 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
667 template<
bool EXCLUSIVE>
668 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
677 static constexpr double identity = 1.0;
678 static constexpr int REDOP_ID = LEGION_REDOP_PROD_FLOAT64;
680 template<
bool EXCLUSIVE>
681 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
682 template<
bool EXCLUSIVE>
683 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
686#ifdef LEGION_REDOP_COMPLEX
687#ifdef LEGION_REDOP_HALF
691 typedef complex<__half> LHS;
692 typedef complex<__half> RHS;
694 static inline const complex<__half> identity =
695 complex<__half>(__half(1,
false ), __half(0,
false ));
696 static constexpr int REDOP_ID = LEGION_REDOP_PROD_COMPLEX32;
698 template<
bool EXCLUSIVE>
699 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
700 template<
bool EXCLUSIVE>
701 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
706 class ProdReduction<complex<float> > {
708 typedef complex<float> LHS;
709 typedef complex<float> RHS;
711 static inline const complex<float> identity = complex<float>(1.f, 0.f);
712 static constexpr int REDOP_ID = LEGION_REDOP_PROD_COMPLEX64;
714 template<
bool EXCLUSIVE>
715 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
716 template<
bool EXCLUSIVE>
717 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
733 static constexpr int8_t identity = 1;
734 static constexpr int REDOP_ID = LEGION_REDOP_DIV_INT8;
736 template<
bool EXCLUSIVE>
737 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
738 template<
bool EXCLUSIVE>
739 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
748 static constexpr int16_t identity = 1;
749 static constexpr int REDOP_ID = LEGION_REDOP_DIV_INT16;
751 template<
bool EXCLUSIVE>
752 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
753 template<
bool EXCLUSIVE>
754 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
763 static constexpr int32_t identity = 1;
764 static constexpr int REDOP_ID = LEGION_REDOP_DIV_INT32;
766 template<
bool EXCLUSIVE>
767 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
768 template<
bool EXCLUSIVE>
769 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
778 static constexpr int64_t identity = 1;
779 static constexpr int REDOP_ID = LEGION_REDOP_DIV_INT64;
781 template<
bool EXCLUSIVE>
782 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
783 template<
bool EXCLUSIVE>
784 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
793 static constexpr uint8_t identity = 1;
794 static constexpr int REDOP_ID = LEGION_REDOP_DIV_UINT8;
796 template<
bool EXCLUSIVE>
797 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
798 template<
bool EXCLUSIVE>
799 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
805 typedef uint16_t LHS;
806 typedef uint16_t RHS;
808 static constexpr uint16_t identity = 1;
809 static constexpr int REDOP_ID = LEGION_REDOP_DIV_UINT16;
811 template<
bool EXCLUSIVE>
812 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
813 template<
bool EXCLUSIVE>
814 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
820 typedef uint32_t LHS;
821 typedef uint32_t RHS;
823 static constexpr uint32_t identity = 1;
824 static constexpr int REDOP_ID = LEGION_REDOP_DIV_UINT32;
826 template<
bool EXCLUSIVE>
827 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
828 template<
bool EXCLUSIVE>
829 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
835 typedef uint64_t LHS;
836 typedef uint64_t RHS;
838 static constexpr uint64_t identity = 1;
839 static constexpr int REDOP_ID = LEGION_REDOP_DIV_UINT64;
841 template<
bool EXCLUSIVE>
842 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
843 template<
bool EXCLUSIVE>
844 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
847#ifdef LEGION_REDOP_HALF
854 static inline const __half identity = __half(1,
false );
855 static constexpr int REDOP_ID = LEGION_REDOP_DIV_FLOAT16;
857 template<
bool EXCLUSIVE>
858 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
859 template<
bool EXCLUSIVE>
860 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
870 static constexpr float identity = 1.f;
871 static constexpr int REDOP_ID = LEGION_REDOP_DIV_FLOAT32;
873 template<
bool EXCLUSIVE>
874 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
875 template<
bool EXCLUSIVE>
876 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
885 static constexpr double identity = 1.0;
886 static constexpr int REDOP_ID = LEGION_REDOP_DIV_FLOAT64;
888 template<
bool EXCLUSIVE>
889 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
890 template<
bool EXCLUSIVE>
891 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
894#ifdef LEGION_REDOP_COMPLEX
895#ifdef LEGION_REDOP_HALF
899 typedef complex<__half> LHS;
900 typedef complex<__half> RHS;
902 static inline const complex<__half> identity =
903 complex<__half>(__half(1,
false ), __half(0,
false ));
904 static constexpr int REDOP_ID = LEGION_REDOP_DIV_COMPLEX32;
906 template<
bool EXCLUSIVE>
907 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
908 template<
bool EXCLUSIVE>
909 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
914 class DivReduction<complex<float> > {
916 typedef complex<float> LHS;
917 typedef complex<float> RHS;
919 static inline const complex<float> identity = complex<float>(1.f, 0.f);
920 static constexpr int REDOP_ID = LEGION_REDOP_DIV_COMPLEX64;
922 template<
bool EXCLUSIVE>
923 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
924 template<
bool EXCLUSIVE>
925 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
941 static constexpr bool identity =
false;
942 static constexpr int REDOP_ID = LEGION_REDOP_MAX_BOOL;
944 template<
bool EXCLUSIVE>
945 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
946 template<
bool EXCLUSIVE>
947 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
956 static constexpr int8_t identity = std::numeric_limits<int8_t>::min();
957 static constexpr int REDOP_ID = LEGION_REDOP_MAX_INT8;
959 template<
bool EXCLUSIVE>
960 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
961 template<
bool EXCLUSIVE>
962 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
971 static constexpr int16_t identity = std::numeric_limits<int16_t>::min();
972 static constexpr int REDOP_ID = LEGION_REDOP_MAX_INT16;
974 template<
bool EXCLUSIVE>
975 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
976 template<
bool EXCLUSIVE>
977 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
986 static constexpr int32_t identity = std::numeric_limits<int32_t>::min();
987 static constexpr int REDOP_ID = LEGION_REDOP_MAX_INT32;
989 template<
bool EXCLUSIVE>
990 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
991 template<
bool EXCLUSIVE>
992 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1001 static constexpr int64_t identity = std::numeric_limits<int64_t>::min();
1002 static constexpr int REDOP_ID = LEGION_REDOP_MAX_INT64;
1004 template<
bool EXCLUSIVE>
1005 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1006 template<
bool EXCLUSIVE>
1007 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1013 typedef uint8_t LHS;
1014 typedef uint8_t RHS;
1016 static constexpr uint8_t identity = 0;
1017 static constexpr int REDOP_ID = LEGION_REDOP_MAX_UINT8;
1019 template<
bool EXCLUSIVE>
1020 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1021 template<
bool EXCLUSIVE>
1022 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1028 typedef uint16_t LHS;
1029 typedef uint16_t RHS;
1031 static constexpr uint16_t identity = 0;
1032 static constexpr int REDOP_ID = LEGION_REDOP_MAX_UINT16;
1034 template<
bool EXCLUSIVE>
1035 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1036 template<
bool EXCLUSIVE>
1037 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1043 typedef uint32_t LHS;
1044 typedef uint32_t RHS;
1046 static constexpr uint32_t identity = 0;
1047 static constexpr int REDOP_ID = LEGION_REDOP_MAX_UINT32;
1049 template<
bool EXCLUSIVE>
1050 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1051 template<
bool EXCLUSIVE>
1052 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1058 typedef uint64_t LHS;
1059 typedef uint64_t RHS;
1061 static constexpr uint64_t identity = 0;
1062 static constexpr int REDOP_ID = LEGION_REDOP_MAX_UINT64;
1064 template<
bool EXCLUSIVE>
1065 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1066 template<
bool EXCLUSIVE>
1067 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1070#ifdef LEGION_REDOP_HALF
1077 static inline const __half identity = __half(-2e10);
1078 static constexpr int REDOP_ID = LEGION_REDOP_MAX_FLOAT16;
1080 template<
bool EXCLUSIVE>
1081 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1082 template<
bool EXCLUSIVE>
1083 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1093 static constexpr float identity = std::numeric_limits<float>::lowest();
1094 static constexpr int REDOP_ID = LEGION_REDOP_MAX_FLOAT32;
1096 template<
bool EXCLUSIVE>
1097 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1098 template<
bool EXCLUSIVE>
1099 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1108 static constexpr double identity = std::numeric_limits<double>::lowest();
1109 static constexpr int REDOP_ID = LEGION_REDOP_MAX_FLOAT64;
1111 template<
bool EXCLUSIVE>
1112 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1113 template<
bool EXCLUSIVE>
1114 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1117 template<
typename T>
1129 static constexpr bool identity =
true;
1130 static constexpr int REDOP_ID = LEGION_REDOP_MIN_BOOL;
1132 template<
bool EXCLUSIVE>
1133 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1134 template<
bool EXCLUSIVE>
1135 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1144 static constexpr int8_t identity = std::numeric_limits<int8_t>::max();
1145 static constexpr int REDOP_ID = LEGION_REDOP_MIN_INT8;
1147 template<
bool EXCLUSIVE>
1148 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1149 template<
bool EXCLUSIVE>
1150 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1156 typedef int16_t LHS;
1157 typedef int16_t RHS;
1159 static constexpr int16_t identity = std::numeric_limits<int16_t>::max();
1160 static constexpr int REDOP_ID = LEGION_REDOP_MIN_INT16;
1162 template<
bool EXCLUSIVE>
1163 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1164 template<
bool EXCLUSIVE>
1165 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1171 typedef int32_t LHS;
1172 typedef int32_t RHS;
1174 static constexpr int32_t identity = std::numeric_limits<int32_t>::max();
1175 static constexpr int REDOP_ID = LEGION_REDOP_MIN_INT32;
1177 template<
bool EXCLUSIVE>
1178 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1179 template<
bool EXCLUSIVE>
1180 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1186 typedef int64_t LHS;
1187 typedef int64_t RHS;
1189 static constexpr int64_t identity = std::numeric_limits<int64_t>::max();
1190 static constexpr int REDOP_ID = LEGION_REDOP_MIN_INT64;
1192 template<
bool EXCLUSIVE>
1193 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1194 template<
bool EXCLUSIVE>
1195 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1201 typedef uint8_t LHS;
1202 typedef uint8_t RHS;
1204 static constexpr uint8_t identity = std::numeric_limits<uint8_t>::max();
1205 static constexpr int REDOP_ID = LEGION_REDOP_MIN_UINT8;
1207 template<
bool EXCLUSIVE>
1208 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1209 template<
bool EXCLUSIVE>
1210 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1216 typedef uint16_t LHS;
1217 typedef uint16_t RHS;
1219 static constexpr uint16_t identity = std::numeric_limits<uint16_t>::max();
1220 static constexpr int REDOP_ID = LEGION_REDOP_MIN_UINT16;
1222 template<
bool EXCLUSIVE>
1223 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1224 template<
bool EXCLUSIVE>
1225 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1231 typedef uint32_t LHS;
1232 typedef uint32_t RHS;
1234 static constexpr uint32_t identity = std::numeric_limits<uint32_t>::max();
1235 static constexpr int REDOP_ID = LEGION_REDOP_MIN_UINT32;
1237 template<
bool EXCLUSIVE>
1238 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1239 template<
bool EXCLUSIVE>
1240 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1246 typedef uint64_t LHS;
1247 typedef uint64_t RHS;
1249 static constexpr uint64_t identity = std::numeric_limits<uint64_t>::max();
1250 static constexpr int REDOP_ID = LEGION_REDOP_MIN_UINT64;
1252 template<
bool EXCLUSIVE>
1253 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1254 template<
bool EXCLUSIVE>
1255 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1258#ifdef LEGION_REDOP_HALF
1265 static inline const __half identity = __half(2e10);
1266 static constexpr int REDOP_ID = LEGION_REDOP_MIN_FLOAT16;
1268 template<
bool EXCLUSIVE>
1269 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1270 template<
bool EXCLUSIVE>
1271 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1281 static constexpr float identity = std::numeric_limits<float>::max();
1282 static constexpr int REDOP_ID = LEGION_REDOP_MIN_FLOAT32;
1284 template<
bool EXCLUSIVE>
1285 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1286 template<
bool EXCLUSIVE>
1287 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1296 static constexpr double identity = std::numeric_limits<double>::max();
1297 static constexpr int REDOP_ID = LEGION_REDOP_MIN_FLOAT64;
1299 template<
bool EXCLUSIVE>
1300 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1301 template<
bool EXCLUSIVE>
1302 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1305 template<
typename T>
1317 static constexpr int8_t identity = 0;
1318 static constexpr int REDOP_ID = LEGION_REDOP_OR_INT8;
1320 template<
bool EXCLUSIVE>
1321 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1322 template<
bool EXCLUSIVE>
1323 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1329 typedef int16_t LHS;
1330 typedef int16_t RHS;
1332 static constexpr int16_t identity = 0;
1333 static constexpr int REDOP_ID = LEGION_REDOP_OR_INT16;
1335 template<
bool EXCLUSIVE>
1336 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1337 template<
bool EXCLUSIVE>
1338 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1344 typedef int32_t LHS;
1345 typedef int32_t RHS;
1347 static constexpr int32_t identity = 0;
1348 static constexpr int REDOP_ID = LEGION_REDOP_OR_INT32;
1350 template<
bool EXCLUSIVE>
1351 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1352 template<
bool EXCLUSIVE>
1353 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1359 typedef int64_t LHS;
1360 typedef int64_t RHS;
1362 static constexpr int64_t identity = 0;
1363 static constexpr int REDOP_ID = LEGION_REDOP_OR_INT64;
1365 template<
bool EXCLUSIVE>
1366 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1367 template<
bool EXCLUSIVE>
1368 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1374 typedef uint8_t LHS;
1375 typedef uint8_t RHS;
1377 static constexpr uint8_t identity = 0;
1378 static constexpr int REDOP_ID = LEGION_REDOP_OR_UINT8;
1380 template<
bool EXCLUSIVE>
1381 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1382 template<
bool EXCLUSIVE>
1383 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1389 typedef uint16_t LHS;
1390 typedef uint16_t RHS;
1392 static constexpr uint16_t identity = 0;
1393 static constexpr int REDOP_ID = LEGION_REDOP_OR_UINT16;
1395 template<
bool EXCLUSIVE>
1396 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1397 template<
bool EXCLUSIVE>
1398 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1404 typedef uint32_t LHS;
1405 typedef uint32_t RHS;
1407 static constexpr uint32_t identity = 0;
1408 static constexpr int REDOP_ID = LEGION_REDOP_OR_UINT32;
1410 template<
bool EXCLUSIVE>
1411 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1412 template<
bool EXCLUSIVE>
1413 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1419 typedef uint64_t LHS;
1420 typedef uint64_t RHS;
1422 static constexpr uint64_t identity = 0;
1423 static constexpr int REDOP_ID = LEGION_REDOP_OR_UINT64;
1425 template<
bool EXCLUSIVE>
1426 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1427 template<
bool EXCLUSIVE>
1428 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1431 template<
typename T>
1443 static constexpr int8_t identity = (int8_t)0xFF;
1444 static constexpr int REDOP_ID = LEGION_REDOP_AND_INT8;
1446 template<
bool EXCLUSIVE>
1447 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1448 template<
bool EXCLUSIVE>
1449 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1455 typedef int16_t LHS;
1456 typedef int16_t RHS;
1458 static constexpr int16_t identity = (int16_t)0xFFFF;
1459 static constexpr int REDOP_ID = LEGION_REDOP_AND_INT16;
1461 template<
bool EXCLUSIVE>
1462 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1463 template<
bool EXCLUSIVE>
1464 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1470 typedef int32_t LHS;
1471 typedef int32_t RHS;
1473 static constexpr int32_t identity = 0xFFFF;
1474 static constexpr int REDOP_ID = LEGION_REDOP_AND_INT32;
1476 template<
bool EXCLUSIVE>
1477 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1478 template<
bool EXCLUSIVE>
1479 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1485 typedef int64_t LHS;
1486 typedef int64_t RHS;
1488 static constexpr int64_t identity = 0xFFFFFFFFL;
1489 static constexpr int REDOP_ID = LEGION_REDOP_AND_INT64;
1491 template<
bool EXCLUSIVE>
1492 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1493 template<
bool EXCLUSIVE>
1494 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1500 typedef uint8_t LHS;
1501 typedef uint8_t RHS;
1503 static constexpr uint8_t identity = 0xFFU;
1504 static constexpr int REDOP_ID = LEGION_REDOP_AND_UINT8;
1506 template<
bool EXCLUSIVE>
1507 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1508 template<
bool EXCLUSIVE>
1509 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1515 typedef uint16_t LHS;
1516 typedef uint16_t RHS;
1518 static constexpr uint16_t identity = 0xFFFFU;
1519 static constexpr int REDOP_ID = LEGION_REDOP_AND_UINT16;
1521 template<
bool EXCLUSIVE>
1522 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1523 template<
bool EXCLUSIVE>
1524 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1530 typedef uint32_t LHS;
1531 typedef uint32_t RHS;
1533 static constexpr uint32_t identity = 0xFFFFFFFFU;
1534 static constexpr int REDOP_ID = LEGION_REDOP_AND_UINT32;
1536 template<
bool EXCLUSIVE>
1537 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1538 template<
bool EXCLUSIVE>
1539 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1545 typedef uint64_t LHS;
1546 typedef uint64_t RHS;
1548 static constexpr uint64_t identity = 0xFFFFFFFFUL;
1549 static constexpr int REDOP_ID = LEGION_REDOP_AND_UINT64;
1551 template<
bool EXCLUSIVE>
1552 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1553 template<
bool EXCLUSIVE>
1554 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1557 template<
typename T>
1569 static constexpr bool identity =
false;
1570 static constexpr int REDOP_ID = LEGION_REDOP_XOR_BOOL;
1572 template<
bool EXCLUSIVE>
1573 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1574 template<
bool EXCLUSIVE>
1575 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1584 static constexpr int8_t identity = 0;
1585 static constexpr int REDOP_ID = LEGION_REDOP_XOR_INT8;
1587 template<
bool EXCLUSIVE>
1588 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1589 template<
bool EXCLUSIVE>
1590 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1596 typedef int16_t LHS;
1597 typedef int16_t RHS;
1599 static constexpr int16_t identity = 0;
1600 static constexpr int REDOP_ID = LEGION_REDOP_XOR_INT16;
1602 template<
bool EXCLUSIVE>
1603 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1604 template<
bool EXCLUSIVE>
1605 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1611 typedef int32_t LHS;
1612 typedef int32_t RHS;
1614 static constexpr int32_t identity = 0;
1615 static constexpr int REDOP_ID = LEGION_REDOP_XOR_INT32;
1617 template<
bool EXCLUSIVE>
1618 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1619 template<
bool EXCLUSIVE>
1620 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1626 typedef int64_t LHS;
1627 typedef int64_t RHS;
1629 static constexpr int64_t identity = 0;
1630 static constexpr int REDOP_ID = LEGION_REDOP_XOR_INT64;
1632 template<
bool EXCLUSIVE>
1633 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1634 template<
bool EXCLUSIVE>
1635 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1641 typedef uint8_t LHS;
1642 typedef uint8_t RHS;
1644 static constexpr uint8_t identity = 0;
1645 static constexpr int REDOP_ID = LEGION_REDOP_XOR_UINT8;
1647 template<
bool EXCLUSIVE>
1648 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1649 template<
bool EXCLUSIVE>
1650 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1656 typedef uint16_t LHS;
1657 typedef uint16_t RHS;
1659 static constexpr uint16_t identity = 0;
1660 static constexpr int REDOP_ID = LEGION_REDOP_XOR_UINT16;
1662 template<
bool EXCLUSIVE>
1663 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1664 template<
bool EXCLUSIVE>
1665 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1671 typedef uint32_t LHS;
1672 typedef uint32_t RHS;
1674 static constexpr uint32_t identity = 0;
1675 static constexpr int REDOP_ID = LEGION_REDOP_XOR_UINT32;
1677 template<
bool EXCLUSIVE>
1678 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1679 template<
bool EXCLUSIVE>
1680 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1686 typedef uint64_t LHS;
1687 typedef uint64_t RHS;
1689 static constexpr uint64_t identity = 0;
1690 static constexpr int REDOP_ID = LEGION_REDOP_XOR_UINT64;
1692 template<
bool EXCLUSIVE>
1693 __LEGION_CUDA_HD__
static void apply(LHS& lhs, RHS rhs);
1694 template<
bool EXCLUSIVE>
1695 __LEGION_CUDA_HD__
static void fold(RHS& rhs1, RHS rhs2);
1702#define LEGION_REDOP_LIST_BASE(__op__) \
1704 __op__(LEGION_REDOP_SUM_INT8, SumReduction<int8_t>) \
1705 __op__(LEGION_REDOP_SUM_INT16, SumReduction<int16_t>) \
1706 __op__(LEGION_REDOP_SUM_INT32, SumReduction<int32_t>) \
1707 __op__(LEGION_REDOP_SUM_INT64, SumReduction<int64_t>) \
1708 __op__(LEGION_REDOP_SUM_UINT8, SumReduction<uint8_t>) \
1709 __op__(LEGION_REDOP_SUM_UINT16, SumReduction<uint16_t>) \
1710 __op__(LEGION_REDOP_SUM_UINT32, SumReduction<uint32_t>) \
1711 __op__(LEGION_REDOP_SUM_UINT64, SumReduction<uint64_t>) \
1712 __op__(LEGION_REDOP_SUM_FLOAT32, SumReduction<float>) \
1713 __op__(LEGION_REDOP_SUM_FLOAT64, SumReduction<double>) \
1715 __op__(LEGION_REDOP_DIFF_INT8, DiffReduction<int8_t>) \
1716 __op__(LEGION_REDOP_DIFF_INT16, DiffReduction<int16_t>) \
1717 __op__(LEGION_REDOP_DIFF_INT32, DiffReduction<int32_t>) \
1718 __op__(LEGION_REDOP_DIFF_INT64, DiffReduction<int64_t>) \
1719 __op__(LEGION_REDOP_DIFF_UINT8, DiffReduction<uint8_t>) \
1720 __op__(LEGION_REDOP_DIFF_UINT16, DiffReduction<uint16_t>) \
1721 __op__(LEGION_REDOP_DIFF_UINT32, DiffReduction<uint32_t>) \
1722 __op__(LEGION_REDOP_DIFF_UINT64, DiffReduction<uint64_t>) \
1723 __op__(LEGION_REDOP_DIFF_FLOAT32, DiffReduction<float>) \
1724 __op__(LEGION_REDOP_DIFF_FLOAT64, DiffReduction<double>) \
1726 __op__(LEGION_REDOP_PROD_INT8, ProdReduction<int8_t>) \
1727 __op__(LEGION_REDOP_PROD_INT16, ProdReduction<int16_t>) \
1728 __op__(LEGION_REDOP_PROD_INT32, ProdReduction<int32_t>) \
1729 __op__(LEGION_REDOP_PROD_INT64, ProdReduction<int64_t>) \
1730 __op__(LEGION_REDOP_PROD_UINT8, ProdReduction<uint8_t>) \
1731 __op__(LEGION_REDOP_PROD_UINT16, ProdReduction<uint16_t>) \
1732 __op__(LEGION_REDOP_PROD_UINT32, ProdReduction<uint32_t>) \
1733 __op__(LEGION_REDOP_PROD_UINT64, ProdReduction<uint64_t>) \
1734 __op__(LEGION_REDOP_PROD_FLOAT32, ProdReduction<float>) \
1735 __op__(LEGION_REDOP_PROD_FLOAT64, ProdReduction<double>) \
1737 __op__(LEGION_REDOP_DIV_INT8, DivReduction<int8_t>) \
1738 __op__(LEGION_REDOP_DIV_INT16, DivReduction<int16_t>) \
1739 __op__(LEGION_REDOP_DIV_INT32, DivReduction<int32_t>) \
1740 __op__(LEGION_REDOP_DIV_INT64, DivReduction<int64_t>) \
1741 __op__(LEGION_REDOP_DIV_UINT8, DivReduction<uint8_t>) \
1742 __op__(LEGION_REDOP_DIV_UINT16, DivReduction<uint16_t>) \
1743 __op__(LEGION_REDOP_DIV_UINT32, DivReduction<uint32_t>) \
1744 __op__(LEGION_REDOP_DIV_UINT64, DivReduction<uint64_t>) \
1745 __op__(LEGION_REDOP_DIV_FLOAT32, DivReduction<float>) \
1746 __op__(LEGION_REDOP_DIV_FLOAT64, DivReduction<double>) \
1748 __op__(LEGION_REDOP_MAX_BOOL, MaxReduction<bool>) \
1749 __op__(LEGION_REDOP_MAX_INT8, MaxReduction<int8_t>) \
1750 __op__(LEGION_REDOP_MAX_INT16, MaxReduction<int16_t>) \
1751 __op__(LEGION_REDOP_MAX_INT32, MaxReduction<int32_t>) \
1752 __op__(LEGION_REDOP_MAX_INT64, MaxReduction<int64_t>) \
1753 __op__(LEGION_REDOP_MAX_UINT8, MaxReduction<uint8_t>) \
1754 __op__(LEGION_REDOP_MAX_UINT16, MaxReduction<uint16_t>) \
1755 __op__(LEGION_REDOP_MAX_UINT32, MaxReduction<uint32_t>) \
1756 __op__(LEGION_REDOP_MAX_UINT64, MaxReduction<uint64_t>) \
1757 __op__(LEGION_REDOP_MAX_FLOAT32, MaxReduction<float>) \
1758 __op__(LEGION_REDOP_MAX_FLOAT64, MaxReduction<double>) \
1760 __op__(LEGION_REDOP_MIN_BOOL, MinReduction<bool>) \
1761 __op__(LEGION_REDOP_MIN_INT8, MinReduction<int8_t>) \
1762 __op__(LEGION_REDOP_MIN_INT16, MinReduction<int16_t>) \
1763 __op__(LEGION_REDOP_MIN_INT32, MinReduction<int32_t>) \
1764 __op__(LEGION_REDOP_MIN_INT64, MinReduction<int64_t>) \
1765 __op__(LEGION_REDOP_MIN_UINT8, MinReduction<uint8_t>) \
1766 __op__(LEGION_REDOP_MIN_UINT16, MinReduction<uint16_t>) \
1767 __op__(LEGION_REDOP_MIN_UINT32, MinReduction<uint32_t>) \
1768 __op__(LEGION_REDOP_MIN_UINT64, MinReduction<uint64_t>) \
1769 __op__(LEGION_REDOP_MIN_FLOAT32, MinReduction<float>) \
1770 __op__(LEGION_REDOP_MIN_FLOAT64, MinReduction<double>) \
1772 __op__(LEGION_REDOP_OR_BOOL, SumReduction<bool>) \
1773 __op__(LEGION_REDOP_OR_INT8, OrReduction<int8_t>) \
1774 __op__(LEGION_REDOP_OR_INT16, OrReduction<int16_t>) \
1775 __op__(LEGION_REDOP_OR_INT32, OrReduction<int32_t>) \
1776 __op__(LEGION_REDOP_OR_INT64, OrReduction<int64_t>) \
1777 __op__(LEGION_REDOP_OR_UINT8, OrReduction<uint8_t>) \
1778 __op__(LEGION_REDOP_OR_UINT16, OrReduction<uint16_t>) \
1779 __op__(LEGION_REDOP_OR_UINT32, OrReduction<uint32_t>) \
1780 __op__(LEGION_REDOP_OR_UINT64, OrReduction<uint64_t>) \
1782 __op__(LEGION_REDOP_AND_BOOL, ProdReduction<bool>) \
1783 __op__(LEGION_REDOP_AND_INT8, AndReduction<int8_t>) \
1784 __op__(LEGION_REDOP_AND_INT16, AndReduction<int16_t>) \
1785 __op__(LEGION_REDOP_AND_INT32, AndReduction<int32_t>) \
1786 __op__(LEGION_REDOP_AND_INT64, AndReduction<int64_t>) \
1787 __op__(LEGION_REDOP_AND_UINT8, AndReduction<uint8_t>) \
1788 __op__(LEGION_REDOP_AND_UINT16, AndReduction<uint16_t>) \
1789 __op__(LEGION_REDOP_AND_UINT32, AndReduction<uint32_t>) \
1790 __op__(LEGION_REDOP_AND_UINT64, AndReduction<uint64_t>) \
1792 __op__(LEGION_REDOP_XOR_BOOL, XorReduction<bool>) \
1793 __op__(LEGION_REDOP_XOR_INT8, XorReduction<int8_t>) \
1794 __op__(LEGION_REDOP_XOR_INT16, XorReduction<int16_t>) \
1795 __op__(LEGION_REDOP_XOR_INT32, XorReduction<int32_t>) \
1796 __op__(LEGION_REDOP_XOR_INT64, XorReduction<int64_t>) \
1797 __op__(LEGION_REDOP_XOR_UINT8, XorReduction<uint8_t>) \
1798 __op__(LEGION_REDOP_XOR_UINT16, XorReduction<uint16_t>) \
1799 __op__(LEGION_REDOP_XOR_UINT32, XorReduction<uint32_t>) \
1800 __op__(LEGION_REDOP_XOR_UINT64, XorReduction<uint64_t>)
1802#ifdef LEGION_REDOP_HALF
1803 #define LEGION_REDOP_LIST_HALF(__op__) \
1804 __op__(LEGION_REDOP_SUM_FLOAT16, SumReduction<__half>) \
1805 __op__(LEGION_REDOP_DIFF_FLOAT16, DiffReduction<__half>) \
1806 __op__(LEGION_REDOP_PROD_FLOAT16, ProdReduction<__half>) \
1807 __op__(LEGION_REDOP_DIV_FLOAT16, DivReduction<__half>) \
1808 __op__(LEGION_REDOP_MAX_FLOAT16, MaxReduction<__half>) \
1809 __op__(LEGION_REDOP_MIN_FLOAT16, MinReduction<__half>)
1811 #define LEGION_REDOP_LIST_HALF(__op__)
1813#ifdef LEGION_REDOP_COMPLEX
1814 #define LEGION_REDOP_LIST_COMPLEX(__op__) \
1815 __op__(LEGION_REDOP_SUM_COMPLEX64, SumReduction<complex<float> >) \
1816 __op__(LEGION_REDOP_DIFF_COMPLEX64, DiffReduction<complex<float> >) \
1817 __op__(LEGION_REDOP_PROD_COMPLEX64, ProdReduction<complex<float> >) \
1818 __op__(LEGION_REDOP_DIV_COMPLEX64, DivReduction<complex<float> >) \
1819 __op__(LEGION_REDOP_SUM_COMPLEX128, SumReduction<complex<double> >)
1821 #ifdef LEGION_REDOP_HALF
1822 #define LEGION_REDOP_LIST_HALF_COMPLEX(__op__) \
1823 __op__(LEGION_REDOP_SUM_COMPLEX32, SumReduction<complex<__half> >) \
1824 __op__(LEGION_REDOP_DIFF_COMPLEX32, DiffReduction<complex<__half> >) \
1825 __op__(LEGION_REDOP_PROD_COMPLEX32, ProdReduction<complex<__half> >) \
1826 __op__(LEGION_REDOP_DIV_COMPLEX32, DivReduction<complex<__half> >)
1828 #define LEGION_REDOP_LIST_HALF_COMPLEX(__op__)
1831 #define LEGION_REDOP_LIST_COMPLEX(__op__)
1832 #define LEGION_REDOP_LIST_HALF_COMPLEX(__op__)
1835#define LEGION_REDOP_LIST(__op__) \
1836 LEGION_REDOP_LIST_BASE(__op__) \
1837 LEGION_REDOP_LIST_HALF(__op__) \
1838 LEGION_REDOP_LIST_COMPLEX(__op__) \
1839 LEGION_REDOP_LIST_HALF_COMPLEX(__op__)
1845#include "legion/api/redop.inl"
Definition accessors.h:29