16 #ifndef __INTREPID2_ARRAYTOOLS_HPP__
17 #define __INTREPID2_ARRAYTOOLS_HPP__
19 #include "Intrepid2_ConfigDefs.hpp"
24 #include "Kokkos_Core.hpp"
43 template<
typename DeviceType>
45 using ExecSpaceType =
typename DeviceType::execution_space;
65 template<
typename outputFieldValueType,
class ...outputFieldProperties,
66 typename leftFieldValueType,
class ...leftFieldProperties,
67 typename rightFieldValueType,
class ...rightFieldProperties>
70 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
71 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
72 const bool sumInto =
false );
94 template<
typename outputFieldValueType,
class ...outputFieldProperties,
95 typename leftFieldValueType,
class ...leftFieldProperties,
96 typename rightFieldValueType,
class ...rightFieldProperties>
99 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
100 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
101 const bool sumInto =
false );
124 template<
typename outputFieldValueType,
class ...outputFieldProperties,
125 typename leftFieldValueType,
class ...leftFieldProperties,
126 typename rightFieldValueType,
class ...rightFieldProperties>
129 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
130 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
131 const bool sumInto =
false );
150 template<
typename outputFieldValueType,
class ...outputFieldProperties,
151 typename inputDataValueType,
class ...inputDataProperties,
152 typename inputFieldValueType,
class ...inputFieldProperties>
155 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
156 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
157 const bool sumInto =
false );
177 template<
typename outputFieldValueType,
class ...outputFieldProperties,
178 typename inputDataValueType,
class ...inputDataProperties,
179 typename inputFieldValueType,
class ...inputFieldProperties>
182 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
183 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
184 const bool sumInto =
false );
205 template<
typename outputFieldValueType,
class ...outputFieldProperties,
206 typename inputDataValueType,
class ...inputDataProperties,
207 typename inputFieldValueType,
class ...inputFieldProperties>
210 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
211 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
212 const bool sumInto =
false);
229 template<
typename outputDataValueType,
class ...outputDataProperties,
230 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
231 typename inputDataRightValueType,
class ...inputDataRightProperties>
234 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
235 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
236 const bool sumInto =
false );
253 template<
typename outputDataValueType,
class ...outputDataProperties,
254 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
255 typename inputDataRightValueType,
class ...inputDataRightProperties>
258 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
259 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
260 const bool sumInto =
false );
278 template<
typename outputDataValueType,
class ...outputDataProperties,
279 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
280 typename inputDataRightValueType,
class ...inputDataRightProperties>
283 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
284 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
285 const bool sumInto =
false );
316 template<
typename outputFieldValueType,
class ...outputFieldProperties,
317 typename inputDataValueType,
class ...inputDataProperties,
318 typename inputFieldValueType,
class ...inputFieldProperties>
321 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
322 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
323 const bool reciprocal =
false );
353 template<
typename outputDataValueType,
class ...outputDataProperties,
354 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
355 typename inputDataRightValueType,
class ...inputDataRightProperties>
358 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
359 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
360 const bool reciprocal =
false );
389 template<
typename outputFieldValueType,
class ...outputFieldProperties,
390 typename inputDataValueType,
class ...inputDataProperties,
391 typename inputFieldValueType,
class ...inputFieldProperties>
393 dotMultiplyDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
394 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
395 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
423 template<
typename outputDataValueType,
class ...outputDataProperties,
424 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
425 typename inputDataRightValueType,
class ...inputDataRightProperties>
427 dotMultiplyDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
428 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
429 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight );
453 template<
typename outputFieldValueType,
class ...outputFieldProperties,
454 typename inputDataValueType,
class ...inputDataProperties,
455 typename inputFieldValueType,
class ...inputFieldProperties>
457 crossProductDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
458 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
459 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
481 template<
typename outputDataValueType,
class ...outputDataProperties,
482 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
483 typename inputDataRightValueType,
class ...inputDataRightProperties>
485 crossProductDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
486 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
487 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight );
511 template<
typename outputFieldValueType,
class ...outputFieldProperties,
512 typename inputDataValueType,
class ...inputDataProperties,
513 typename inputFieldValueType,
class ...inputFieldProperties>
515 outerProductDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
516 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
517 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
540 template<
typename outputDataValueType,
class ...outputDataProperties,
541 typename inputDataLeftValuetype,
class ...inputDataLeftProperties,
542 typename inputDataRightValueType,
class ...inputDataRightProperties>
544 outerProductDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
545 const Kokkos::DynRankView<inputDataLeftValuetype, inputDataLeftProperties...> inputDataLeft,
546 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight );
583 template<
typename outputFieldValueType,
class ...outputFieldProperties,
584 typename inputDataValueType,
class ...inputDataProperties,
585 typename inputFieldValueType,
class ...inputFieldProperties>
588 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
589 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
590 const char transpose =
'N');
624 template<
typename outputDataValueType,
class ...outputDataProperties,
625 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
626 typename inputDataRightValueType,
class ...inputDataRightProperties>
629 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
630 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
631 const char transpose =
'N');
667 template<
typename outputFieldValueType,
class ...outputFieldProperties,
668 typename inputDataValueType,
class ...inputDataProperties,
669 typename inputFieldValueType,
class ...inputFieldProperties>
672 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
673 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields,
674 const char transpose =
'N' );
709 template<
typename outputDataValueType,
class ...outputDataProperties,
710 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
711 typename inputDataRightValueType,
class ...inputDataRightProperties>
714 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
715 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
716 const char transpose =
'N' );
734 template<
typename outputFieldValueType,
class ...outputFieldProperties,
735 typename inputFieldValueType,
class ...inputFieldProperties>
737 cloneFields( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
738 const Kokkos::DynRankView<inputFieldValueType, inputFieldProperties...> inputFields );
756 template<
typename outputDataValueType,
class ...outputDataProperties,
757 typename inputDataValueType,
class ...inputDataProperties>
759 cloneData( Kokkos::DynRankView<outputDataValueType,outputDataProperties...> outputData,
760 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData );
771 template<
typename outputFieldValueType,
class ...outputFieldProperties,
772 typename leftFieldValueType,
class ...leftFieldProperties,
773 typename rightFieldValueType,
class ...rightFieldProperties>
775 contractFieldField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
776 const Kokkos::DynRankView<leftFieldValueType, leftFieldProperties...> leftFields,
777 const Kokkos::DynRankView<rightFieldValueType, rightFieldProperties...> rightFields,
778 const bool sumInto );
780 template<
typename outputFieldValueType,
class ...outputFieldProperties,
781 typename inputDataValueType,
class ...inputDataProperties,
782 typename inputFieldValuetype,
class ...inputFieldProperties>
784 contractDataField( Kokkos::DynRankView<outputFieldValueType,outputFieldProperties...> outputFields,
785 const Kokkos::DynRankView<inputDataValueType, inputDataProperties...> inputData,
786 const Kokkos::DynRankView<inputFieldValuetype, inputFieldProperties...> inputFields,
787 const bool sumInto );
789 template<
typename outputDataValueType,
class ...outputDataProperties,
790 typename inputDataLeftValueType,
class ...inputDataLeftProperties,
791 typename inputDataRightValueType,
class ...inputDataRightProperties>
793 contractDataData( Kokkos::DynRankView<outputDataValueType, outputDataProperties...> outputData,
794 const Kokkos::DynRankView<inputDataLeftValueType, inputDataLeftProperties...> inputDataLeft,
795 const Kokkos::DynRankView<inputDataRightValueType,inputDataRightProperties...> inputDataRight,
796 const bool sumInto );
798 template<
typename outputValueType,
class ...outputProperties,
799 typename leftInputValueType,
class ...leftInputProperties,
800 typename rightInputValueType,
class ...rightInputProperties>
802 dotMultiply( Kokkos::DynRankView<outputValueType, outputProperties...> output,
803 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
804 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
805 const bool hasField );
807 template<
typename outputValueType,
class ...outputProperties,
808 typename leftInputValueType,
class ...leftInputProperties,
809 typename rightInputValueType,
class ...rightInputProperties>
811 crossProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
812 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
813 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
814 const bool hasField );
816 template<
typename outputValueType,
class ...outputProperties,
817 typename leftInputValueType,
class ...leftInputProperties,
818 typename rightInputValueType,
class ...rightInputProperties>
820 outerProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
821 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
822 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
823 const bool hasField );
825 template<
typename outputValueType,
class ...outputProperties,
826 typename leftInputValueType,
class ...leftInputProperties,
827 typename rightInputValueType,
class ...rightInputProperties>
829 matvecProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
830 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
831 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
833 const bool isTranspose );
835 template<
typename outputValueType,
class ...outputProperties,
836 typename leftInputValueType,
class ...leftInputProperties,
837 typename rightInputValueType,
class ...rightInputProperties>
839 matmatProduct( Kokkos::DynRankView<outputValueType, outputProperties...> output,
840 const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInput,
841 const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInput,
843 const bool isTranspose );
Contains definitions of custom data types in Intrepid2.
Header file for small functions used in Intrepid2.