From c783a5938a57a45bc12743af0fad45e51e040ff0 Mon Sep 17 00:00:00 2001 From: Abdelrauf Date: Mon, 1 Jun 2020 12:47:21 +0400 Subject: [PATCH] Cmake compilation helper module (#478) * Cmake: generate compilation units Corrections. Added loops/cpu compilation units Config files Signed-off-by: Abdelrauf * Cmake compilation helper module: fix cmake variable scope and some typos Signed-off-by: Abdelrauf * Cmake compilation helper: added other generations. should fix cuda compilation Signed-off-by: Abdelrauf * crop_and_resize adopted new compilation units setup Signed-off-by: raver119@gmail.com * Cmake Compilation Helper: Added comments and some configurations file Signed-off-by: Abdelrauf * minor fix Signed-off-by: Abdelrauf Co-authored-by: raver119@gmail.com --- libnd4j/CMakeLists.txt | 4 + libnd4j/blas/CMakeLists.txt | 27 +++-- libnd4j/cmake/GenCompilation.cmake | 103 ++++++++++++++++++ ...0.cpp => IndexReductionLoops_int32.cpp.in} | 7 +- .../cpu/loops/IndexReductionLoops_int32_2.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int32_3.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int32_4.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int32_5.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int32_6.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int32_7.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int32_8.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int32_9.cpp | 24 ---- ...1.cpp => IndexReductionLoops_int64.cpp.in} | 6 +- .../cpu/loops/IndexReductionLoops_int64_0.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_1.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_2.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_3.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_4.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_5.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_6.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_7.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_8.cpp | 24 ---- .../cpu/loops/IndexReductionLoops_int64_9.cpp | 24 ---- .../cpu/loops/Reduction3Loops.cpp.in} | 9 +- ...uction3Loops_0.cpp => Reduction3Loops.hpp} | 3 +- .../helpers/cpu/loops/Reduction3Loops_1.cpp | 60 ---------- .../helpers/cpu/loops/Reduction3Loops_2.cpp | 60 ---------- .../helpers/cpu/loops/Reduction3Loops_3.cpp | 60 ---------- .../cpu/loops/ReductionLoops_float.cpp.in} | 12 +- ...s_float_0.cpp => ReductionLoops_float.hpp} | 3 +- .../cpu/loops/ReductionLoops_float_1.cpp | 52 --------- .../cpu/loops/ReductionLoops_float_2.cpp | 49 --------- .../cpu/loops/ReductionLoops_float_3.cpp | 49 --------- ...st_bool_p0.cpp => broadcast_bool_p.cpp.in} | 5 +- .../compilation_units/broadcast_bool_p1.cpp | 27 ----- .../compilation_units/broadcast_bool_p2.cpp | 27 ----- .../compilation_units/broadcast_bool_p3.cpp | 27 ----- .../compilation_units/broadcast_bool_p4.cpp | 27 ----- .../compilation_units/broadcast_bool_p5.cpp | 27 ----- .../compilation_units/broadcast_bool_p6.cpp | 27 ----- .../compilation_units/broadcast_bool_p7.cpp | 27 ----- .../compilation_units/broadcast_bool_p8.cpp | 27 ----- .../compilation_units/broadcast_bool_p9.cpp | 27 ----- ...cast_int_p0.cpp => broadcast_int_p.cpp.in} | 5 +- .../compilation_units/broadcast_int_p1.cpp | 27 ----- .../compilation_units/broadcast_int_p2.cpp | 27 ----- .../compilation_units/broadcast_int_p3.cpp | 27 ----- .../compilation_units/broadcast_int_p4.cpp | 27 ----- .../compilation_units/broadcast_int_p5.cpp | 27 ----- .../compilation_units/broadcast_int_p6.cpp | 27 ----- .../compilation_units/broadcast_int_p7.cpp | 27 ----- .../{broadcast_p0.cpp => broadcast_p.cpp.in} | 6 +- .../cpu/compilation_units/broadcast_p1.cpp | 27 ----- .../cpu/compilation_units/broadcast_p10.cpp | 27 ----- .../cpu/compilation_units/broadcast_p11.cpp | 27 ----- .../cpu/compilation_units/broadcast_p12.cpp | 27 ----- .../cpu/compilation_units/broadcast_p2.cpp | 27 ----- .../cpu/compilation_units/broadcast_p3.cpp | 27 ----- .../cpu/compilation_units/broadcast_p4.cpp | 27 ----- .../cpu/compilation_units/broadcast_p5.cpp | 27 ----- .../cpu/compilation_units/broadcast_p6.cpp | 27 ----- .../cpu/compilation_units/broadcast_p7.cpp | 27 ----- .../cpu/compilation_units/broadcast_p8.cpp | 27 ----- .../cpu/compilation_units/broadcast_p9.cpp | 27 ----- ...e_int32_0.cpp => indexreduce_int32.cpp.in} | 6 +- .../compilation_units/indexreduce_int32_2.cpp | 28 ----- .../compilation_units/indexreduce_int32_3.cpp | 28 ----- .../compilation_units/indexreduce_int32_4.cpp | 28 ----- .../compilation_units/indexreduce_int32_5.cpp | 28 ----- .../compilation_units/indexreduce_int32_6.cpp | 28 ----- .../compilation_units/indexreduce_int32_7.cpp | 28 ----- .../compilation_units/indexreduce_int32_8.cpp | 28 ----- .../compilation_units/indexreduce_int32_9.cpp | 28 ----- ...e_int32_1.cpp => indexreduce_int64.cpp.in} | 6 +- .../compilation_units/indexreduce_int64_0.cpp | 28 ----- .../compilation_units/indexreduce_int64_1.cpp | 28 ----- .../compilation_units/indexreduce_int64_2.cpp | 28 ----- .../compilation_units/indexreduce_int64_3.cpp | 28 ----- .../compilation_units/indexreduce_int64_4.cpp | 28 ----- .../compilation_units/indexreduce_int64_5.cpp | 28 ----- .../compilation_units/indexreduce_int64_6.cpp | 28 ----- .../compilation_units/indexreduce_int64_7.cpp | 28 ----- .../compilation_units/indexreduce_int64_8.cpp | 28 ----- .../compilation_units/indexreduce_int64_9.cpp | 28 ----- .../{pairwise_p0.cpp => pairwise_p.cpp.in} | 6 +- .../cpu/compilation_units/pairwise_p1.cpp | 28 ----- .../cpu/compilation_units/pairwise_p10.cpp | 27 ----- .../cpu/compilation_units/pairwise_p11.cpp | 27 ----- .../cpu/compilation_units/pairwise_p12.cpp | 27 ----- .../cpu/compilation_units/pairwise_p2.cpp | 27 ----- .../cpu/compilation_units/pairwise_p3.cpp | 27 ----- .../cpu/compilation_units/pairwise_p4.cpp | 27 ----- .../cpu/compilation_units/pairwise_p5.cpp | 27 ----- .../cpu/compilation_units/pairwise_p6.cpp | 27 ----- .../cpu/compilation_units/pairwise_p7.cpp | 27 ----- .../cpu/compilation_units/pairwise_p8.cpp | 27 ----- .../cpu/compilation_units/pairwise_p9.cpp | 27 ----- .../{random_0.cpp => random.cpp.in} | 6 +- .../loops/cpu/compilation_units/random_1.cpp | 27 ----- .../loops/cpu/compilation_units/random_2.cpp | 27 ----- .../loops/cpu/compilation_units/random_3.cpp | 27 ----- ...bfloat16_0.cpp => reduce3_bfloat16.cpp.in} | 6 +- .../compilation_units/reduce3_bfloat16_4.cpp | 28 ----- .../compilation_units/reduce3_bfloat16_5.cpp | 28 ----- .../compilation_units/reduce3_bfloat16_6.cpp | 28 ----- .../compilation_units/reduce3_bfloat16_7.cpp | 28 ----- .../compilation_units/reduce3_bfloat16_8.cpp | 28 ----- .../compilation_units/reduce3_bfloat16_9.cpp | 28 ----- ...3_bfloat16_1.cpp => reduce3_double.cpp.in} | 6 +- .../compilation_units/reduce3_double_0.cpp | 28 ----- .../compilation_units/reduce3_double_1.cpp | 28 ----- .../compilation_units/reduce3_double_2.cpp | 28 ----- .../compilation_units/reduce3_double_3.cpp | 28 ----- .../compilation_units/reduce3_double_4.cpp | 28 ----- .../compilation_units/reduce3_double_5.cpp | 28 ----- .../compilation_units/reduce3_double_6.cpp | 28 ----- .../compilation_units/reduce3_double_7.cpp | 28 ----- .../compilation_units/reduce3_double_8.cpp | 28 ----- .../compilation_units/reduce3_double_9.cpp | 28 ----- ...e3_bfloat16_2.cpp => reduce3_float.cpp.in} | 6 +- ..._bfloat16_3.cpp => reduce3_float16.cpp.in} | 6 +- .../compilation_units/reduce3_float16_0.cpp | 28 ----- .../compilation_units/reduce3_float16_1.cpp | 28 ----- .../compilation_units/reduce3_float16_2.cpp | 28 ----- .../compilation_units/reduce3_float16_3.cpp | 28 ----- .../compilation_units/reduce3_float16_4.cpp | 28 ----- .../compilation_units/reduce3_float16_5.cpp | 28 ----- .../compilation_units/reduce3_float16_6.cpp | 28 ----- .../compilation_units/reduce3_float16_7.cpp | 28 ----- .../compilation_units/reduce3_float16_8.cpp | 28 ----- .../compilation_units/reduce3_float16_9.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_0.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_1.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_2.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_3.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_4.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_5.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_6.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_7.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_8.cpp | 28 ----- .../cpu/compilation_units/reduce3_float_9.cpp | 28 ----- ...reduce_float_0.cpp => reduce_float.cpp.in} | 6 +- .../cpu/compilation_units/reduce_float_2.cpp | 28 ----- .../cpu/compilation_units/reduce_float_3.cpp | 28 ----- .../{scalar_p0.cpp => scalar_p.cpp.in} | 6 +- .../loops/cpu/compilation_units/scalar_p1.cpp | 27 ----- .../cpu/compilation_units/scalar_p10.cpp | 27 ----- .../cpu/compilation_units/scalar_p11.cpp | 27 ----- .../cpu/compilation_units/scalar_p12.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p2.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p3.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p4.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p5.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p6.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p7.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p8.cpp | 27 ----- .../loops/cpu/compilation_units/scalar_p9.cpp | 27 ----- .../broadcasting_0.cu => broadcasting.cu.in} | 6 +- .../broadcasting/broadcasting_1.cu | 27 ----- .../broadcasting/broadcasting_10.cu | 27 ----- .../broadcasting/broadcasting_11.cu | 27 ----- .../broadcasting/broadcasting_12.cu | 27 ----- .../broadcasting/broadcasting_2.cu | 27 ----- .../broadcasting/broadcasting_3.cu | 27 ----- .../broadcasting/broadcasting_4.cu | 27 ----- .../broadcasting/broadcasting_5.cu | 27 ----- .../broadcasting/broadcasting_6.cu | 27 ----- .../broadcasting/broadcasting_7.cu | 27 ----- .../broadcasting/broadcasting_8.cu | 27 ----- .../broadcasting/broadcasting_9.cu | 27 ----- .../pairwise_0.cu => pairwise.cu.in} | 6 +- .../compilation_units/pairwise/pairwise_1.cu | 27 ----- .../compilation_units/pairwise/pairwise_10.cu | 27 ----- .../compilation_units/pairwise/pairwise_11.cu | 27 ----- .../compilation_units/pairwise/pairwise_12.cu | 27 ----- .../compilation_units/pairwise/pairwise_2.cu | 27 ----- .../compilation_units/pairwise/pairwise_3.cu | 27 ----- .../compilation_units/pairwise/pairwise_4.cu | 27 ----- .../compilation_units/pairwise/pairwise_5.cu | 27 ----- .../compilation_units/pairwise/pairwise_6.cu | 27 ----- .../compilation_units/pairwise/pairwise_7.cu | 27 ----- .../compilation_units/pairwise/pairwise_8.cu | 27 ----- .../compilation_units/pairwise/pairwise_9.cu | 27 ----- .../cuda/compilation_units/reduce3.cu.in | 27 +++++ .../compilation_units/reduce3/reduce3_0.cu | 27 ----- .../compilation_units/reduce3/reduce3_1.cu | 27 ----- .../compilation_units/reduce3/reduce3_2.cu | 27 ----- .../compilation_units/reduce3/reduce3_3.cu | 27 ----- .../compilation_units/reduce_float.cu.in} | 9 +- .../reduce_float/reduce_float_0.cu | 27 ----- .../reduce_float/reduce_float_1.cu | 27 ----- .../reduce_float/reduce_float_2.cu | 27 ----- .../reduce_float/reduce_float_3.cu | 27 ----- .../{scalar/scalar_0.cu => scalar.cu.in} | 6 +- .../cuda/compilation_units/scalar/scalar_1.cu | 27 ----- .../compilation_units/scalar/scalar_10.cu | 27 ----- .../compilation_units/scalar/scalar_11.cu | 27 ----- .../compilation_units/scalar/scalar_12.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_2.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_3.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_4.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_5.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_6.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_7.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_8.cu | 27 ----- .../cuda/compilation_units/scalar/scalar_9.cu | 27 ----- .../cpu/compilation_units/argamax.cpp.in | 10 +- .../cpu/compilation_units/argamin.cpp.in | 1 + .../cpu/compilation_units/argmax.cpp.in | 1 + .../cpu/compilation_units/argmin.cpp.in | 2 + ...nd_resize_3.cpp => crop_and_resize.cpp.in} | 7 +- .../crop_and_resize/crop_and_resize_0.cpp | 30 ----- .../crop_and_resize/crop_and_resize_1.cpp | 30 ----- .../crop_and_resize/crop_and_resize_2.cpp | 30 ----- .../crop_and_resize/crop_and_resize_4.cpp | 30 ----- .../crop_and_resize/crop_and_resize_5.cpp | 30 ----- .../crop_and_resize/crop_and_resize_6.cpp | 30 ----- .../crop_and_resize/crop_and_resize_7.cpp | 30 ----- .../crop_and_resize/crop_and_resize_8.cpp | 30 ----- .../crop_and_resize/crop_and_resize_9.cpp | 30 ----- ...ls_double_0.cpp => specials_double.cpp.in} | 8 +- .../compilation_units/specials_double_3.cpp | 26 ----- .../compilation_units/specials_double_4.cpp | 26 ----- .../compilation_units/specials_double_5.cpp | 26 ----- .../compilation_units/specials_double_6.cpp | 26 ----- .../compilation_units/specials_double_7.cpp | 26 ----- .../compilation_units/specials_double_8.cpp | 26 ----- .../compilation_units/specials_double_9.cpp | 26 ----- ...ls_single_0.cpp => specials_single.cpp.in} | 6 +- .../compilation_units/specials_single_1.cpp | 26 ----- .../compilation_units/specials_single_2.cpp | 26 ----- .../compilation_units/specials_single_3.cpp | 26 ----- .../compilation_units/specials_single_4.cpp | 26 ----- .../compilation_units/specials_single_5.cpp | 26 ----- .../compilation_units/specials_single_6.cpp | 26 ----- .../compilation_units/specials_single_7.cpp | 26 ----- .../compilation_units/specials_single_8.cpp | 26 ----- .../compilation_units/specials_single_9.cpp | 26 ----- .../tests_cpu/libnd4j_tests/CMakeLists.txt | 15 +-- 239 files changed, 253 insertions(+), 5791 deletions(-) create mode 100644 libnd4j/cmake/GenCompilation.cmake rename libnd4j/include/helpers/cpu/loops/{IndexReductionLoops_int32_0.cpp => IndexReductionLoops_int32.cpp.in} (88%) delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_2.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_3.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_4.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_5.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_6.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_7.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_8.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_9.cpp rename libnd4j/include/helpers/cpu/loops/{IndexReductionLoops_int32_1.cpp => IndexReductionLoops_int64.cpp.in} (88%) delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_0.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_1.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_2.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_3.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_4.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_5.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_6.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_7.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_8.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_9.cpp rename libnd4j/include/{ops/impl/compilation_units/specials_double_1.cpp => helpers/cpu/loops/Reduction3Loops.cpp.in} (80%) rename libnd4j/include/helpers/cpu/loops/{Reduction3Loops_0.cpp => Reduction3Loops.hpp} (96%) delete mode 100644 libnd4j/include/helpers/cpu/loops/Reduction3Loops_1.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/Reduction3Loops_2.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/Reduction3Loops_3.cpp rename libnd4j/include/{ops/impl/compilation_units/specials_double_2.cpp => helpers/cpu/loops/ReductionLoops_float.cpp.in} (79%) rename libnd4j/include/helpers/cpu/loops/{ReductionLoops_float_0.cpp => ReductionLoops_float.hpp} (95%) delete mode 100644 libnd4j/include/helpers/cpu/loops/ReductionLoops_float_1.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/ReductionLoops_float_2.cpp delete mode 100644 libnd4j/include/helpers/cpu/loops/ReductionLoops_float_3.cpp rename libnd4j/include/loops/cpu/compilation_units/{broadcast_bool_p0.cpp => broadcast_bool_p.cpp.in} (87%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p9.cpp rename libnd4j/include/loops/cpu/compilation_units/{broadcast_int_p0.cpp => broadcast_int_p.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_int_p1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_int_p2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_int_p3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_int_p4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_int_p5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_int_p6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_int_p7.cpp rename libnd4j/include/loops/cpu/compilation_units/{broadcast_p0.cpp => broadcast_p.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p10.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p11.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p12.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/broadcast_p9.cpp rename libnd4j/include/loops/cpu/compilation_units/{indexreduce_int32_0.cpp => indexreduce_int32.cpp.in} (87%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_9.cpp rename libnd4j/include/loops/cpu/compilation_units/{indexreduce_int32_1.cpp => indexreduce_int64.cpp.in} (87%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_0.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_9.cpp rename libnd4j/include/loops/cpu/compilation_units/{pairwise_p0.cpp => pairwise_p.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p10.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p11.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p12.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/pairwise_p9.cpp rename libnd4j/include/loops/cpu/compilation_units/{random_0.cpp => random.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/random_1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/random_2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/random_3.cpp rename libnd4j/include/loops/cpu/compilation_units/{reduce3_bfloat16_0.cpp => reduce3_bfloat16.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_9.cpp rename libnd4j/include/loops/cpu/compilation_units/{reduce3_bfloat16_1.cpp => reduce3_double.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_0.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_double_9.cpp rename libnd4j/include/loops/cpu/compilation_units/{reduce3_bfloat16_2.cpp => reduce3_float.cpp.in} (89%) rename libnd4j/include/loops/cpu/compilation_units/{reduce3_bfloat16_3.cpp => reduce3_float16.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_0.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float16_9.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_0.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce3_float_9.cpp rename libnd4j/include/loops/cpu/compilation_units/{reduce_float_0.cpp => reduce_float.cpp.in} (87%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce_float_2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/reduce_float_3.cpp rename libnd4j/include/loops/cpu/compilation_units/{scalar_p0.cpp => scalar_p.cpp.in} (89%) delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p1.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p10.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p11.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p12.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p2.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p3.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p4.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p5.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p6.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p7.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p8.cpp delete mode 100644 libnd4j/include/loops/cpu/compilation_units/scalar_p9.cpp rename libnd4j/include/loops/cuda/compilation_units/{broadcasting/broadcasting_0.cu => broadcasting.cu.in} (89%) delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_1.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_10.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_11.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_12.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_2.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_3.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_4.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_5.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_6.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_7.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_8.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_9.cu rename libnd4j/include/loops/cuda/compilation_units/{pairwise/pairwise_0.cu => pairwise.cu.in} (88%) delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_1.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_10.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_11.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_12.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_2.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_3.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_4.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_5.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_6.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_7.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_8.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_9.cu create mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce3.cu.in delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_0.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_1.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_2.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_3.cu rename libnd4j/include/loops/{cpu/compilation_units/reduce_float_1.cpp => cuda/compilation_units/reduce_float.cu.in} (86%) delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_0.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_1.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_2.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_3.cu rename libnd4j/include/loops/cuda/compilation_units/{scalar/scalar_0.cu => scalar.cu.in} (89%) delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_1.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_10.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_11.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_12.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_2.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_3.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_4.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_5.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_6.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_7.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_8.cu delete mode 100644 libnd4j/include/loops/cuda/compilation_units/scalar/scalar_9.cu rename libnd4j/include/ops/declarable/helpers/cpu/compilation_units/{crop_and_resize/crop_and_resize_3.cpp => crop_and_resize.cpp.in} (84%) delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_0.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_1.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_2.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_4.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_5.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_6.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_7.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_8.cpp delete mode 100644 libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_9.cpp rename libnd4j/include/ops/impl/compilation_units/{specials_double_0.cpp => specials_double.cpp.in} (86%) delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_double_3.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_double_4.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_double_5.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_double_6.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_double_7.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_double_8.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_double_9.cpp rename libnd4j/include/ops/impl/compilation_units/{specials_single_0.cpp => specials_single.cpp.in} (90%) delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_1.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_2.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_3.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_4.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_5.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_6.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_7.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_8.cpp delete mode 100644 libnd4j/include/ops/impl/compilation_units/specials_single_9.cpp diff --git a/libnd4j/CMakeLists.txt b/libnd4j/CMakeLists.txt index 3376bd6b6..0c78b3409 100755 --- a/libnd4j/CMakeLists.txt +++ b/libnd4j/CMakeLists.txt @@ -17,6 +17,10 @@ option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler" OF set(FLATBUFFERS_BUILD_FLATC "OFF" CACHE STRING "Hack to disable flatc build" FORCE) set(CMAKE_CXX_STANDARD 11) + + +include(GenCompilation) + if (SD_CUDA) enable_language(CUDA) set(CMAKE_CUDA_STANDARD 11) diff --git a/libnd4j/blas/CMakeLists.txt b/libnd4j/blas/CMakeLists.txt index 8419cdd4c..fb1dc066e 100755 --- a/libnd4j/blas/CMakeLists.txt +++ b/libnd4j/blas/CMakeLists.txt @@ -226,6 +226,14 @@ if(SD_CUDA) file(GLOB_RECURSE LEGACY_SOURCES false ../include/legacy/impl/*.cpp ../include/legacy/*.cu ../include/legacy/*.h) file(GLOB_RECURSE LOOPS_SOURCES_CUDA false ../include/loops/*.cu) + + file(GLOB_RECURSE COMPILATION_UNITS false ../include/loops/cuda/compilation_units/*.cu.in + ../include/ops/impl/compilation_units/*.cpp.in) + + foreach(FL_ITEM ${COMPILATION_UNITS}) + genCompilation(FL_ITEM) + endforeach() + if (HAVE_CUDNN) message("cuDNN included") file(GLOB_RECURSE CUSTOMOPS_CUDNN_SOURCES false ../include/ops/declarable/platform/cudnn/*.cu) @@ -234,7 +242,9 @@ if(SD_CUDA) add_library(samediff_obj OBJECT ${LOOPS_SOURCES_CUDA} ${LEGACY_SOURCES} ${CUSTOMOPS_HELPERS_SOURCES} ${HELPERS_SOURCES} ${EXEC_SOURCES} ${LOOPS_SOURCES} ${ARRAY_SOURCES} ${TYPES_SOURCES} - ${MEMORY_SOURCES} ${GRAPH_SOURCES} ${CUSTOMOPS_SOURCES} ${INDEXING_SOURCES} ${EXCEPTIONS_SOURCES} ${OPS_SOURCES} ${PERF_SOURCES} ${CUSTOMOPS_CUDNN_SOURCES} ${CUSTOMOPS_MKLDNN_SOURCES}) + ${MEMORY_SOURCES} ${GRAPH_SOURCES} ${CUSTOMOPS_SOURCES} ${INDEXING_SOURCES} ${EXCEPTIONS_SOURCES} ${OPS_SOURCES} ${PERF_SOURCES} ${CUSTOMOPS_CUDNN_SOURCES} ${CUSTOMOPS_MKLDNN_SOURCES} + ${CUSTOMOPS_GENERIC_SOURCES} + ) if (WIN32) message("MSVC runtime for library: ${MSVC_RT_LIB}") @@ -295,15 +305,12 @@ elseif(SD_CPU) file(GLOB_RECURSE LOOPS_SOURCES false ../include/loops/*.cpp ../include/loops/*.h) - file(GLOB_RECURSE COMPILATION_UNITS false ../include/ops/declarable/helpers/cpu/compilation_units/*.cpp.in) - foreach(FL_ITEM ${COMPILATION_UNITS}) - string(REGEX MATCH "^(.*)\\.cpp\.in$" dummy ${FL_ITEM}) - set(FL_ITEM_WLE ${CMAKE_MATCH_1}) - foreach(FL_TYPE_INDEX RANGE 0 9) - #message( "${FL_ITEM_WLE}_${FL_TYPE_INDEX}.cpp") - configure_file( "${FL_ITEM}" "${FL_ITEM_WLE}_${FL_TYPE_INDEX}.cpp" @ONLY) - LIST(APPEND CUSTOMOPS_GENERIC_SOURCES ${FL_ITEM_WLE}_${FL_TYPE_INDEX}.cpp ) - endforeach() + file(GLOB_RECURSE COMPILATION_UNITS false ../include/ops/declarable/helpers/cpu/compilation_units/*.cpp.in + ../include/loops/cpu/compilation_units/*.cpp.in ../include/helpers/cpu/loops/*.cpp.in + ../include/ops/impl/compilation_units/*.cpp.in) + + foreach(FL_ITEM ${COMPILATION_UNITS}) + genCompilation(FL_ITEM) endforeach() if (SD_X86_BUILD) diff --git a/libnd4j/cmake/GenCompilation.cmake b/libnd4j/cmake/GenCompilation.cmake new file mode 100644 index 000000000..9f977633d --- /dev/null +++ b/libnd4j/cmake/GenCompilation.cmake @@ -0,0 +1,103 @@ +################################################################################ +# Copyright (c) 2020 Konduit K.K. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ + +#/////////////////////////////////////////////////////////////////////////////// +# genCompilation: Generates cpp, cu files +# INPUT: +# $FILE_ITEM template-configuration that utilizes libnd4j type, macros helpers +# defined inside { include/types/types.h, include/system/type_boilerplate.h} +# OUTPUT: +# $CUSTOMOPS_GENERIC_SOURCES generated files will be added into this List +#//////////////////////////////////////////////////////////////////////////////// +# A simple template-configuration file example: +# // hints and defines what types will be generated +# #cmakedefine LIBND4J_TYPE_GEN +# #cmakedefine FLOAT_TYPE_GEN +# // below if defines blocks are needed for correctly handling multiple types +# #if defined(LIBND4J_TYPE_GEN) +# BUILD_DOUBLE_TEMPLATE(template void someFunc, (arg_list,..), +# LIBND4J_TYPES_@FL_TYPE_INDEX@, INDEXING_TYPES); +# #endif +# #if defined(FLOAT_TYPE_GEN) +# BUILD_SINGLE_TEMPLATE(template class SomeClass,, FLOAT_TYPES_@FL_TYPE_INDEX@); +# #endif +#//////////////////////////////////////////////////////////////////////////////// + +function(genCompilation FILE_ITEM) + get_filename_component(FILE_ITEM_WE ${FL_ITEM} NAME_WE) + + set(EXTENSION "cpp") + + if(FL_ITEM MATCHES "cu.in$") + set(EXTENSION "cu") + endif() + + file(READ ${FL_ITEM} CONTENT_FL) + #check content for types + + #set all to false + set (FLOAT_TYPE_GEN 0) + set (INT_TYPE_GEN 0) + set (LIBND4J_TYPE_GEN 0) + set (PAIRWISE_TYPE_GEN 0) + set (RANGE_STOP -1) + + string(REGEX MATCHALL "#cmakedefine[ \t]+[^_]+_TYPE_GEN" TYPE_MATCHES ${CONTENT_FL}) + + foreach(TYPEX ${TYPE_MATCHES}) + set(STOP -1) + if(TYPEX MATCHES "INT_TYPE_GEN$") + set (INT_TYPE_GEN 1) + set(STOP 7) + endif() + if(TYPEX MATCHES "LIBND4J_TYPE_GEN$") + set (LIBND4J_TYPE_GEN 1) + set(STOP 9) + endif() + if(TYPEX MATCHES "FLOAT_TYPE_GEN$") + set (FLOAT_TYPE_GEN 1) + set(STOP 3) + endif() + if(TYPEX MATCHES "PAIRWISE_TYPE_GEN$") + set (PAIRWISE_TYPE_GEN 1) + set(STOP 12) + endif() + if(STOP GREATER RANGE_STOP) + set(RANGE_STOP ${STOP}) + endif() + + endforeach() + + if(RANGE_STOP GREATER -1) + foreach(FL_TYPE_INDEX RANGE 0 ${RANGE_STOP}) + # set OFF if the index is above + if(FL_TYPE_INDEX GREATER 3) + set (FLOAT_TYPE_GEN 0) + endif() + if(FL_TYPE_INDEX GREATER 7) + set (INT_TYPE_GEN 0) + endif() + if(FL_TYPE_INDEX GREATER 9) + set (LIBND4J_TYPE_GEN 0) + endif() + set(GENERATED_SOURCE "${CMAKE_BINARY_DIR}/compilation_units/${FILE_ITEM_WE}_${FL_TYPE_INDEX}.${EXTENSION}") + configure_file( "${FL_ITEM}" "${GENERATED_SOURCE}" @ONLY) + LIST(APPEND CUSTOMOPS_GENERIC_SOURCES ${GENERATED_SOURCE} ) + endforeach() + endif() + + set(CUSTOMOPS_GENERIC_SOURCES ${CUSTOMOPS_GENERIC_SOURCES} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_0.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32.cpp.in similarity index 88% rename from libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_0.cpp rename to libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32.cpp.in index 97318dae8..2030c8017 100644 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_0.cpp +++ b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32.cpp.in @@ -18,7 +18,6 @@ // // @author Yurii Shyrma (iuriish@yahoo.com) // - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_0, (sd::DataType::INT32, int32_t)); \ No newline at end of file +#include +#cmakedefine LIBND4J_TYPE_GEN +BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_@FL_TYPE_INDEX@, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_2.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_2.cpp deleted file mode 100644 index e22635b85..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_2.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_2, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_3.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_3.cpp deleted file mode 100644 index f85096f0a..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_3.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_3, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_4.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_4.cpp deleted file mode 100644 index 5272eba7e..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_4.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_4, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_5.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_5.cpp deleted file mode 100644 index 683d6d0c0..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_5.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_5, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_6.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_6.cpp deleted file mode 100644 index 0ff70b7b5..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_6, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_7.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_7.cpp deleted file mode 100644 index 64d93c5e3..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_7.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_7, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_8.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_8.cpp deleted file mode 100644 index dd586ab26..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_8.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_8, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_9.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_9.cpp deleted file mode 100644 index bb7ef80f7..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_9.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_9, (sd::DataType::INT32, int32_t)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_1.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64.cpp.in similarity index 88% rename from libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_1.cpp rename to libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64.cpp.in index 680bf7a64..0647ce17d 100644 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int32_1.cpp +++ b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64.cpp.in @@ -19,6 +19,6 @@ // @author Yurii Shyrma (iuriish@yahoo.com) // -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_1, (sd::DataType::INT32, int32_t)); \ No newline at end of file +#include +#cmakedefine LIBND4J_TYPE_GEN +BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_@FL_TYPE_INDEX@, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_0.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_0.cpp deleted file mode 100644 index 8d0c55ce1..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_0.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_0, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_1.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_1.cpp deleted file mode 100644 index 7c5824559..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_1.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_1, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_2.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_2.cpp deleted file mode 100644 index 3bb6e6b7c..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_2.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_2, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_3.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_3.cpp deleted file mode 100644 index 49f977901..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_3.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_3, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_4.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_4.cpp deleted file mode 100644 index 73f0e9872..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_4.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_4, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_5.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_5.cpp deleted file mode 100644 index b27aaf341..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_5.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_5, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_6.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_6.cpp deleted file mode 100644 index 452184acd..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_6.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_6, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_7.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_7.cpp deleted file mode 100644 index 59cbc51cf..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_7.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_7, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_8.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_8.cpp deleted file mode 100644 index 51fc49cea..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_8.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_8, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_9.cpp b/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_9.cpp deleted file mode 100644 index b774dde52..000000000 --- a/libnd4j/include/helpers/cpu/loops/IndexReductionLoops_int64_9.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author Yurii Shyrma (iuriish@yahoo.com) -// - -#include "./IndexReductionLoops.hpp" - -BUILD_DOUBLE_TEMPLATE(template void sd::IndexReductionLoops, ::wrapIndexReduce(const int opNum, const void* vx, const Nd4jLong* xShapeInfo, void* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, void* vextraParams), LIBND4J_TYPES_9, (sd::DataType::INT64, Nd4jLong)); \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_1.cpp b/libnd4j/include/helpers/cpu/loops/Reduction3Loops.cpp.in similarity index 80% rename from libnd4j/include/ops/impl/compilation_units/specials_double_1.cpp rename to libnd4j/include/helpers/cpu/loops/Reduction3Loops.cpp.in index a61a98870..4f38b4d8f 100644 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_1.cpp +++ b/libnd4j/include/helpers/cpu/loops/Reduction3Loops.cpp.in @@ -1,6 +1,5 @@ /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at @@ -19,8 +18,10 @@ // @author raver119@gmail.com // -#include "../specials_double.hpp" +#include +#cmakedefine FLOAT_TYPE_GEN namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_1); -} \ No newline at end of file + + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduction3Loops, , LIBND4J_TYPES, FLOAT_TYPES_@FL_TYPE_INDEX@); +} diff --git a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_0.cpp b/libnd4j/include/helpers/cpu/loops/Reduction3Loops.hpp similarity index 96% rename from libnd4j/include/helpers/cpu/loops/Reduction3Loops_0.cpp rename to libnd4j/include/helpers/cpu/loops/Reduction3Loops.hpp index 00b15673b..241dc7e8c 100644 --- a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_0.cpp +++ b/libnd4j/include/helpers/cpu/loops/Reduction3Loops.hpp @@ -55,6 +55,5 @@ namespace sd { DISPATCH_BY_OPNUM_TT(innerloopReduce3All, PARAMS(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, xTadShapeInfo, xTadOffsets, yTadShapeInfo, yTadOffsets, extraParams, start, stop), REDUCE3_OPS); #endif } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduction3Loops, , LIBND4J_TYPES, FLOAT_TYPES_0); + } diff --git a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_1.cpp b/libnd4j/include/helpers/cpu/loops/Reduction3Loops_1.cpp deleted file mode 100644 index da8d3db7e..000000000 --- a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_1.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include -#include -#include - -using namespace simdOps; - -namespace sd { - - template - template - void Reduction3Loops::innerloopReduce3(const X* x, const Nd4jLong* xShapeInfo, const X* y, const Nd4jLong* yShapeInfo, Z* z, const Nd4jLong* zShapeInfo, int* dims, int dimsLen, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - Reduction3Loops::template loopReduce3(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, dims, dimsLen, extraParams, start, stop); -#endif - } - - template - template - void Reduction3Loops::innerloopReduce3All(const X* x, const Nd4jLong* xShapeInfo, const X* y, const Nd4jLong* yShapeInfo, Z* z, const Nd4jLong* zShapeInfo, const Nd4jLong* xTadShapeInfo, const Nd4jLong* xTadOffsets, const Nd4jLong* yTadShapeInfo, const Nd4jLong* yTadOffsets, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - Reduction3Loops::template loopReduce3All(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, xTadShapeInfo, xTadOffsets, yTadShapeInfo, yTadOffsets, extraParams, start, stop); -#endif - } - - template - void Reduction3Loops::wrapper(const int opNum, const X *x, const Nd4jLong *xShapeInfo, const X *y, const Nd4jLong *yShapeInfo, Y *z, const Nd4jLong *zShapeInfo, int* dims, int dimsLen, Y *extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce3, PARAMS(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, dims, dimsLen, extraParams, start, stop), REDUCE3_OPS); -#endif - } - - template - void Reduction3Loops::wrapperAll(const int opNum, const X *x, const Nd4jLong *xShapeInfo, const X *y, const Nd4jLong *yShapeInfo, Y *z, const Nd4jLong *zShapeInfo, const Nd4jLong* xTadShapeInfo, const Nd4jLong* xTadOffsets, const Nd4jLong* yTadShapeInfo, const Nd4jLong* yTadOffsets, Y* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce3All, PARAMS(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, xTadShapeInfo, xTadOffsets, yTadShapeInfo, yTadOffsets, extraParams, start, stop), REDUCE3_OPS); -#endif - } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduction3Loops, , LIBND4J_TYPES, FLOAT_TYPES_1); -} diff --git a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_2.cpp b/libnd4j/include/helpers/cpu/loops/Reduction3Loops_2.cpp deleted file mode 100644 index 06588a2fb..000000000 --- a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_2.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include -#include -#include - -using namespace simdOps; - -namespace sd { - - template - template - void Reduction3Loops::innerloopReduce3(const X* x, const Nd4jLong* xShapeInfo, const X* y, const Nd4jLong* yShapeInfo, Z* z, const Nd4jLong* zShapeInfo, int* dims, int dimsLen, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - Reduction3Loops::template loopReduce3(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, dims, dimsLen, extraParams, start, stop); -#endif - } - - template - template - void Reduction3Loops::innerloopReduce3All(const X* x, const Nd4jLong* xShapeInfo, const X* y, const Nd4jLong* yShapeInfo, Z* z, const Nd4jLong* zShapeInfo, const Nd4jLong* xTadShapeInfo, const Nd4jLong* xTadOffsets, const Nd4jLong* yTadShapeInfo, const Nd4jLong* yTadOffsets, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - Reduction3Loops::template loopReduce3All(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, xTadShapeInfo, xTadOffsets, yTadShapeInfo, yTadOffsets, extraParams, start, stop); -#endif - } - - template - void Reduction3Loops::wrapper(const int opNum, const X *x, const Nd4jLong *xShapeInfo, const X *y, const Nd4jLong *yShapeInfo, Y *z, const Nd4jLong *zShapeInfo, int* dims, int dimsLen, Y *extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce3, PARAMS(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, dims, dimsLen, extraParams, start, stop), REDUCE3_OPS); -#endif - } - - template - void Reduction3Loops::wrapperAll(const int opNum, const X *x, const Nd4jLong *xShapeInfo, const X *y, const Nd4jLong *yShapeInfo, Y *z, const Nd4jLong *zShapeInfo, const Nd4jLong* xTadShapeInfo, const Nd4jLong* xTadOffsets, const Nd4jLong* yTadShapeInfo, const Nd4jLong* yTadOffsets, Y* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce3All, PARAMS(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, xTadShapeInfo, xTadOffsets, yTadShapeInfo, yTadOffsets, extraParams, start, stop), REDUCE3_OPS); -#endif - } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduction3Loops, , LIBND4J_TYPES, FLOAT_TYPES_2); -} diff --git a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_3.cpp b/libnd4j/include/helpers/cpu/loops/Reduction3Loops_3.cpp deleted file mode 100644 index 405b0275b..000000000 --- a/libnd4j/include/helpers/cpu/loops/Reduction3Loops_3.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include -#include -#include - -using namespace simdOps; - -namespace sd { - - template - template - void Reduction3Loops::innerloopReduce3(const X* x, const Nd4jLong* xShapeInfo, const X* y, const Nd4jLong* yShapeInfo, Z* z, const Nd4jLong* zShapeInfo, int* dims, int dimsLen, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - Reduction3Loops::template loopReduce3(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, dims, dimsLen, extraParams, start, stop); -#endif - } - - template - template - void Reduction3Loops::innerloopReduce3All(const X* x, const Nd4jLong* xShapeInfo, const X* y, const Nd4jLong* yShapeInfo, Z* z, const Nd4jLong* zShapeInfo, const Nd4jLong* xTadShapeInfo, const Nd4jLong* xTadOffsets, const Nd4jLong* yTadShapeInfo, const Nd4jLong* yTadOffsets, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - Reduction3Loops::template loopReduce3All(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, xTadShapeInfo, xTadOffsets, yTadShapeInfo, yTadOffsets, extraParams, start, stop); -#endif - } - - template - void Reduction3Loops::wrapper(const int opNum, const X *x, const Nd4jLong *xShapeInfo, const X *y, const Nd4jLong *yShapeInfo, Y *z, const Nd4jLong *zShapeInfo, int* dims, int dimsLen, Y *extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce3, PARAMS(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, dims, dimsLen, extraParams, start, stop), REDUCE3_OPS); -#endif - } - - template - void Reduction3Loops::wrapperAll(const int opNum, const X *x, const Nd4jLong *xShapeInfo, const X *y, const Nd4jLong *yShapeInfo, Y *z, const Nd4jLong *zShapeInfo, const Nd4jLong* xTadShapeInfo, const Nd4jLong* xTadOffsets, const Nd4jLong* yTadShapeInfo, const Nd4jLong* yTadOffsets, Y* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce3All, PARAMS(x, xShapeInfo, y, yShapeInfo, z, zShapeInfo, xTadShapeInfo, xTadOffsets, yTadShapeInfo, yTadOffsets, extraParams, start, stop), REDUCE3_OPS); -#endif - } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduction3Loops, , LIBND4J_TYPES, FLOAT_TYPES_3); -} diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_2.cpp b/libnd4j/include/helpers/cpu/loops/ReductionLoops_float.cpp.in similarity index 79% rename from libnd4j/include/ops/impl/compilation_units/specials_double_2.cpp rename to libnd4j/include/helpers/cpu/loops/ReductionLoops_float.cpp.in index 89deb3d9c..5c1bb227d 100644 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_2.cpp +++ b/libnd4j/include/helpers/cpu/loops/ReductionLoops_float.cpp.in @@ -1,6 +1,5 @@ /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at @@ -19,8 +18,11 @@ // @author raver119@gmail.com // -#include "../specials_double.hpp" - +#include +#cmakedefine FLOAT_TYPE_GEN namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_2); -} \ No newline at end of file + + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReductionFloatLoops, , LIBND4J_TYPES, FLOAT_TYPES_@FL_TYPE_INDEX@); +} + + diff --git a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_0.cpp b/libnd4j/include/helpers/cpu/loops/ReductionLoops_float.hpp similarity index 95% rename from libnd4j/include/helpers/cpu/loops/ReductionLoops_float_0.cpp rename to libnd4j/include/helpers/cpu/loops/ReductionLoops_float.hpp index a3879bee3..c7ed544b2 100644 --- a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_0.cpp +++ b/libnd4j/include/helpers/cpu/loops/ReductionLoops_float.hpp @@ -44,8 +44,7 @@ namespace sd { DISPATCH_BY_OPNUM_TT(innerloopReduce, PARAMS(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams, start, stop), REDUCE_FLOAT_OPS); #endif } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReductionFloatLoops, , LIBND4J_TYPES, FLOAT_TYPES_0); + } diff --git a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_1.cpp b/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_1.cpp deleted file mode 100644 index 6dd555037..000000000 --- a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_1.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "ReductionLoops.hpp" -#include -#include - -using namespace simdOps; - -namespace sd { - - template - template - void ReductionFloatLoops::innerloopReduce(const X * x, const Nd4jLong* xShapeInfo, Z* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - ReductionLoops::template loopReduce(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams, start, stop); -#endif - } - - template - void ReductionFloatLoops::wrapper(const int opNum, - const X *x, const Nd4jLong *xShapeInfo, - Y *z, const Nd4jLong *zShapeInfo, - const Nd4jLong *tadShapeInfo, const Nd4jLong *tadOffsets, - Y *extraParams, - int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce, PARAMS(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams, start, stop), REDUCE_FLOAT_OPS); -#endif - } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReductionFloatLoops, , LIBND4J_TYPES, FLOAT_TYPES_1); -} - - diff --git a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_2.cpp b/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_2.cpp deleted file mode 100644 index ce1042b88..000000000 --- a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_2.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "ReductionLoops.hpp" -#include -#include - -using namespace simdOps; - -namespace sd { - - template - template - void ReductionFloatLoops::innerloopReduce(const X * x, const Nd4jLong* xShapeInfo, Z* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - ReductionLoops::template loopReduce(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams, start, stop); -#endif - } - - template - void ReductionFloatLoops::wrapper(const int opNum, const X *x, const Nd4jLong *xShapeInfo, Y *z, - const Nd4jLong *zShapeInfo, const Nd4jLong *tadShapeInfo, - const Nd4jLong *tadOffsets, Y *extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce, PARAMS(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams, start, stop), REDUCE_FLOAT_OPS); -#endif - } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReductionFloatLoops, , LIBND4J_TYPES, FLOAT_TYPES_2); -} - - diff --git a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_3.cpp b/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_3.cpp deleted file mode 100644 index 6cfac93bc..000000000 --- a/libnd4j/include/helpers/cpu/loops/ReductionLoops_float_3.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "ReductionLoops.hpp" -#include -#include - -using namespace simdOps; - -namespace sd { - - template - template - void ReductionFloatLoops::innerloopReduce(const X * x, const Nd4jLong* xShapeInfo, Z* z, const Nd4jLong* zShapeInfo, const Nd4jLong* tadShapeInfo, const Nd4jLong* tadOffsets, Z* extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - ReductionLoops::template loopReduce(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams, start, stop); -#endif - } - - template - void ReductionFloatLoops::wrapper(const int opNum, const X *x, const Nd4jLong *xShapeInfo, Y *z, - const Nd4jLong *zShapeInfo, const Nd4jLong *tadShapeInfo, - const Nd4jLong *tadOffsets, Y *extraParams, int64_t start, int64_t stop) { -#ifndef INLINE_LOOPS - DISPATCH_BY_OPNUM_TT(innerloopReduce, PARAMS(x, xShapeInfo, z, zShapeInfo, tadShapeInfo, tadOffsets, extraParams, start, stop), REDUCE_FLOAT_OPS); -#endif - } - - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReductionFloatLoops, , LIBND4J_TYPES, FLOAT_TYPES_3); -} - - diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p0.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p.cpp.in similarity index 87% rename from libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p0.cpp rename to libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p.cpp.in index 08ebd92f7..b3c60462b 100644 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p.cpp.in @@ -18,10 +18,11 @@ // Created by raver119 on 23/09/18. // -#include "../broadcasting_bool.hpp" +#include +#cmakedefine LIBND4J_TYPE_GEN namespace functions { namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_0, BOOL_TYPES); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_@FL_TYPE_INDEX@, BOOL_TYPES); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p1.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p1.cpp deleted file mode 100644 index 16e4c817a..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p1.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_1, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p2.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p2.cpp deleted file mode 100644 index 10b32ca41..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p2.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_2, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p3.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p3.cpp deleted file mode 100644 index 547ddd371..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_3, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p4.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p4.cpp deleted file mode 100644 index 3c7dee0a0..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p4.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_4, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p5.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p5.cpp deleted file mode 100644 index b71925dab..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_5, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p6.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p6.cpp deleted file mode 100644 index 23eedd289..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p6.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_6, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p7.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p7.cpp deleted file mode 100644 index c18e7641e..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p7.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_7, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p8.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p8.cpp deleted file mode 100644 index efee34519..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p8.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_8, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p9.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p9.cpp deleted file mode 100644 index 2ab193285..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_bool_p9.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_bool.hpp" - -namespace functions { - namespace broadcast { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT BroadcastBool, , LIBND4J_TYPES_9, BOOL_TYPES); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p0.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/broadcast_int_p0.cpp rename to libnd4j/include/loops/cpu/compilation_units/broadcast_int_p.cpp.in index d3f5ada43..a36c1a0b2 100644 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p.cpp.in @@ -18,10 +18,11 @@ // Created by raver119 on 23/09/18. // -#include "../broadcasting_int.hpp" +#include +#cmakedefine INT_TYPE_GEN namespace functions { namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_0); + BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p1.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p1.cpp deleted file mode 100644 index 82969bdb0..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p1.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_int.hpp" - -namespace functions { - namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p2.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p2.cpp deleted file mode 100644 index 53d928111..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p2.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_int.hpp" - -namespace functions { - namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p3.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p3.cpp deleted file mode 100644 index eba7b78d1..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_int.hpp" - -namespace functions { - namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p4.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p4.cpp deleted file mode 100644 index 47b7350f2..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p4.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_int.hpp" - -namespace functions { - namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_4); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p5.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p5.cpp deleted file mode 100644 index 3afad08f6..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_int.hpp" - -namespace functions { - namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_5); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p6.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p6.cpp deleted file mode 100644 index 286c2680f..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p6.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_int.hpp" - -namespace functions { - namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_6); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p7.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p7.cpp deleted file mode 100644 index 242441561..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_int_p7.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting_int.hpp" - -namespace functions { - namespace broadcast { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT BroadcastInt, , INTEGER_TYPES_7); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p0.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/broadcast_p0.cpp rename to libnd4j/include/loops/cpu/compilation_units/broadcast_p.cpp.in index 943186a8a..1dbb4aac4 100644 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/broadcast_p.cpp.in @@ -18,10 +18,10 @@ // Created by raver119 on 23/09/18. // -#include "../broadcasting.hpp" - +#include +#cmakedefine PAIRWISE_TYPE_GEN namespace functions { namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_0); + BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p1.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p1.cpp deleted file mode 100644 index b38a1c801..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p1.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p10.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p10.cpp deleted file mode 100644 index 983305007..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p10.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_10); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p11.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p11.cpp deleted file mode 100644 index 206b14763..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p11.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_11); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p12.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p12.cpp deleted file mode 100644 index 825c07adf..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p12.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_12); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p2.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p2.cpp deleted file mode 100644 index 341f1afb4..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p2.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p3.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p3.cpp deleted file mode 100644 index 9aa4c227b..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p4.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p4.cpp deleted file mode 100644 index 7f68bb1f8..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p4.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_4); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p5.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p5.cpp deleted file mode 100644 index d2e586bf8..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_5); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p6.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p6.cpp deleted file mode 100644 index a9db2f7f8..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p6.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_6); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p7.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p7.cpp deleted file mode 100644 index 9a2111ee5..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p7.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_7); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p8.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p8.cpp deleted file mode 100644 index 4bbd88ba6..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p8.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_8); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/broadcast_p9.cpp b/libnd4j/include/loops/cpu/compilation_units/broadcast_p9.cpp deleted file mode 100644 index 406a8f8e2..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/broadcast_p9.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "../broadcasting.hpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_9); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_0.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32.cpp.in similarity index 87% rename from libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_0.cpp rename to libnd4j/include/loops/cpu/compilation_units/indexreduce_int32.cpp.in index 89b85485a..97402d38e 100644 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../indexreduce.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace functions { namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_0, (sd::DataType::INT32, int32_t)); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_@FL_TYPE_INDEX@, (sd::DataType::INT32, int32_t)); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_2.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_2.cpp deleted file mode 100644 index 47dce2d5a..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_2.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_2, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_3.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_3.cpp deleted file mode 100644 index c3d33e7f1..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_3.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_3, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_4.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_4.cpp deleted file mode 100644 index 37a81e441..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_4.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_4, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_5.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_5.cpp deleted file mode 100644 index 1d6555ddf..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_5.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_5, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_6.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_6.cpp deleted file mode 100644 index 0bb8aef4d..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_6, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_7.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_7.cpp deleted file mode 100644 index a7d3c733f..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_7.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_7, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_8.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_8.cpp deleted file mode 100644 index 8c5de9653..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_8.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_8, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_9.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_9.cpp deleted file mode 100644 index f61d604e2..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_9.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_9, (sd::DataType::INT32, int32_t)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_1.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64.cpp.in similarity index 87% rename from libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_1.cpp rename to libnd4j/include/loops/cpu/compilation_units/indexreduce_int64.cpp.in index ada7844cb..30fa30749 100644 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int32_1.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../indexreduce.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace functions { namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_1, (sd::DataType::INT32, int32_t)); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_@FL_TYPE_INDEX@, (sd::DataType::INT64, Nd4jLong)); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_0.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_0.cpp deleted file mode 100644 index d399f5e0e..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_0.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_0, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_1.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_1.cpp deleted file mode 100644 index c4df4d2e4..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_1.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_1, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_2.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_2.cpp deleted file mode 100644 index 538e369eb..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_2.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_2, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_3.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_3.cpp deleted file mode 100644 index b0d082bce..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_3.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_3, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_4.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_4.cpp deleted file mode 100644 index 98e13bb63..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_4.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_4, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_5.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_5.cpp deleted file mode 100644 index 4b7f599d9..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_5.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_5, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_6.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_6.cpp deleted file mode 100644 index 8d7de9822..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_6, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_7.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_7.cpp deleted file mode 100644 index 8f9befddb..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_7.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_7, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_8.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_8.cpp deleted file mode 100644 index b38112631..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_8.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_8, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_9.cpp b/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_9.cpp deleted file mode 100644 index baacdc432..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/indexreduce_int64_9.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../indexreduce.hpp" - -namespace functions { - namespace indexreduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT IndexReduce, , LIBND4J_TYPES_9, (sd::DataType::INT64, Nd4jLong)); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p0.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/pairwise_p0.cpp rename to libnd4j/include/loops/cpu/compilation_units/pairwise_p.cpp.in index d498a4400..bbf809de8 100644 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/pairwise_p.cpp.in @@ -18,10 +18,10 @@ // Created by raver119 on 23/09/18. // -#include "loops/cpu/pairwise.hpp" - +#include +#cmakedefine PAIRWISE_TYPE_GEN namespace functions { namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_0); + BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p1.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p1.cpp deleted file mode 100644 index 2a665d9d2..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p1.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_1); - } - -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p10.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p10.cpp deleted file mode 100644 index 4a8aaf94a..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p10.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_10); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p11.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p11.cpp deleted file mode 100644 index 1f4eb1389..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p11.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_11); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p12.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p12.cpp deleted file mode 100644 index 3c0984db9..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p12.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_12); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p2.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p2.cpp deleted file mode 100644 index 0725ae862..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p2.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p3.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p3.cpp deleted file mode 100644 index f9dcf3519..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p4.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p4.cpp deleted file mode 100644 index a7b63427d..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p4.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_4); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p5.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p5.cpp deleted file mode 100644 index 3f8557ea9..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_5); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p6.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p6.cpp deleted file mode 100644 index 2b5dc9ed4..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p6.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_6); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p7.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p7.cpp deleted file mode 100644 index f5deef719..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p7.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_7); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p8.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p8.cpp deleted file mode 100644 index e2fa75bbb..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p8.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_8); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/pairwise_p9.cpp b/libnd4j/include/loops/cpu/compilation_units/pairwise_p9.cpp deleted file mode 100644 index eb3da276e..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/pairwise_p9.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver119 on 23/09/18. -// - -#include "loops/cpu/pairwise.hpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_9); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/random_0.cpp b/libnd4j/include/loops/cpu/compilation_units/random.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/random_0.cpp rename to libnd4j/include/loops/cpu/compilation_units/random.cpp.in index 6424ccb6e..921532ac8 100644 --- a/libnd4j/include/loops/cpu/compilation_units/random_0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/random.cpp.in @@ -18,10 +18,10 @@ // @author raver119@gmail.com // -#include "../random.hpp" - +#include +#cmakedefine FLOAT_TYPE_GEN namespace functions { namespace random { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT RandomFunction, , FLOAT_TYPES_0); + BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT RandomFunction, , FLOAT_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/random_1.cpp b/libnd4j/include/loops/cpu/compilation_units/random_1.cpp deleted file mode 100644 index 316d55bf6..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/random_1.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../random.hpp" - -namespace functions { - namespace random { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT RandomFunction, , FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/random_2.cpp b/libnd4j/include/loops/cpu/compilation_units/random_2.cpp deleted file mode 100644 index 90d080b63..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/random_2.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../random.hpp" - -namespace functions { - namespace random { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT RandomFunction, , FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/random_3.cpp b/libnd4j/include/loops/cpu/compilation_units/random_3.cpp deleted file mode 100644 index 97e5211e8..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/random_3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../random.hpp" - -namespace functions { - namespace random { - BUILD_SINGLE_TEMPLATE(template class ND4J_EXPORT RandomFunction, , FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_0.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_0.cpp rename to libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16.cpp.in index 19483c1df..68616c3f9 100644 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../reduce3.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace functions { namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_0, FLOAT_TYPES_3); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_@FL_TYPE_INDEX@, FLOAT_TYPES_3); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_4.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_4.cpp deleted file mode 100644 index 0802e11f4..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_4.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_4, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_5.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_5.cpp deleted file mode 100644 index 87ec2d3f8..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_5.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_5, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_6.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_6.cpp deleted file mode 100644 index 10dc7d69b..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_6, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_7.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_7.cpp deleted file mode 100644 index 28ba56376..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_7.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_7, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_8.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_8.cpp deleted file mode 100644 index 8087f6a07..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_8.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_8, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_9.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_9.cpp deleted file mode 100644 index 4a5186cf0..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_9.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_9, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_1.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_1.cpp rename to libnd4j/include/loops/cpu/compilation_units/reduce3_double.cpp.in index 88225bd85..5c722838d 100644 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_1.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/reduce3_double.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../reduce3.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace functions { namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_1, FLOAT_TYPES_3); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_@FL_TYPE_INDEX@, FLOAT_TYPES_2); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_0.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_0.cpp deleted file mode 100644 index 34172b4b3..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_0.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_0, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_1.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_1.cpp deleted file mode 100644 index c2f7c7e9c..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_1.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_1, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_2.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_2.cpp deleted file mode 100644 index 41c1dd679..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_2.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_2, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_3.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_3.cpp deleted file mode 100644 index a44085232..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_3.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_3, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_4.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_4.cpp deleted file mode 100644 index d346d175b..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_4.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_4, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_5.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_5.cpp deleted file mode 100644 index 86cf48ff7..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_5.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_5, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_6.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_6.cpp deleted file mode 100644 index 92f7ac39e..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_6, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_7.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_7.cpp deleted file mode 100644 index eb216f89f..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_7.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_7, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_8.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_8.cpp deleted file mode 100644 index d1e9f8c96..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_8.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_8, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_9.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_double_9.cpp deleted file mode 100644 index fa00bde19..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_double_9.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_9, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_2.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_2.cpp rename to libnd4j/include/loops/cpu/compilation_units/reduce3_float.cpp.in index 7bed85c5d..ee127c2d9 100644 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_2.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/reduce3_float.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../reduce3.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace functions { namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_2, FLOAT_TYPES_3); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_@FL_TYPE_INDEX@, FLOAT_TYPES_1); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_3.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_3.cpp rename to libnd4j/include/loops/cpu/compilation_units/reduce3_float16.cpp.in index 87042d342..65c2b563a 100644 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_bfloat16_3.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../reduce3.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace functions { namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_3, FLOAT_TYPES_3); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_@FL_TYPE_INDEX@, FLOAT_TYPES_0); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_0.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_0.cpp deleted file mode 100644 index cb212b06b..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_0.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_0, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_1.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_1.cpp deleted file mode 100644 index 4a7fdee8a..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_1.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_1, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_2.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_2.cpp deleted file mode 100644 index aaafe1bae..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_2.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_2, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_3.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_3.cpp deleted file mode 100644 index 9b8cf0c6a..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_3.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_3, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_4.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_4.cpp deleted file mode 100644 index 4d02ffe53..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_4.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_4, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_5.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_5.cpp deleted file mode 100644 index 88ce3e5e2..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_5.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_5, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_6.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_6.cpp deleted file mode 100644 index 26d4df1dd..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_6, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_7.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_7.cpp deleted file mode 100644 index 3b04f47aa..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_7.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_7, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_8.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_8.cpp deleted file mode 100644 index c87090229..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_8.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_8, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_9.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_9.cpp deleted file mode 100644 index d5acb3935..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float16_9.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_9, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_0.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_0.cpp deleted file mode 100644 index e7e1fab61..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_0.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_0, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_1.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_1.cpp deleted file mode 100644 index 98ccf8b35..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_1.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_1, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_2.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_2.cpp deleted file mode 100644 index 6782d74ed..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_2.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_2, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_3.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_3.cpp deleted file mode 100644 index 915b0ac0e..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_3.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_3, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_4.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_4.cpp deleted file mode 100644 index d34e61181..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_4.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_4, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_5.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_5.cpp deleted file mode 100644 index 89a8f164f..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_5.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_5, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_6.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_6.cpp deleted file mode 100644 index 70e482b8b..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_6.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_6, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_7.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_7.cpp deleted file mode 100644 index 88663cd7d..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_7.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_7, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_8.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_8.cpp deleted file mode 100644 index d5399a4d8..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_8.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_8, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_9.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce3_float_9.cpp deleted file mode 100644 index e27e7ab12..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce3_float_9.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce3.hpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES_9, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce_float_0.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce_float.cpp.in similarity index 87% rename from libnd4j/include/loops/cpu/compilation_units/reduce_float_0.cpp rename to libnd4j/include/loops/cpu/compilation_units/reduce_float.cpp.in index de4619f29..3837c7810 100644 --- a/libnd4j/include/loops/cpu/compilation_units/reduce_float_0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/reduce_float.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../reduce/reduce_float.hpp" - +#include +#cmakedefine FLOAT_TYPE_GEN namespace functions { namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_0); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_@FL_TYPE_INDEX@); } } diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce_float_2.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce_float_2.cpp deleted file mode 100644 index 8cc2795a4..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce_float_2.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce/reduce_float.hpp" - -namespace functions { - namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_2); - } -} diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce_float_3.cpp b/libnd4j/include/loops/cpu/compilation_units/reduce_float_3.cpp deleted file mode 100644 index 0b94831c3..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/reduce_float_3.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../reduce/reduce_float.hpp" - -namespace functions { - namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_3); - } -} diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p0.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p.cpp.in similarity index 89% rename from libnd4j/include/loops/cpu/compilation_units/scalar_p0.cpp rename to libnd4j/include/loops/cpu/compilation_units/scalar_p.cpp.in index 32f670f46..dc024170d 100644 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p0.cpp +++ b/libnd4j/include/loops/cpu/compilation_units/scalar_p.cpp.in @@ -18,10 +18,10 @@ // Created by raver on 9/28/2018. // -#include "../scalar.hpp" - +#include +#cmakedefine PAIRWISE_TYPE_GEN namespace functions { namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_0); + BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p1.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p1.cpp deleted file mode 100644 index 5146d70bd..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p1.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p10.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p10.cpp deleted file mode 100644 index 7175a8603..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p10.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_10); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p11.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p11.cpp deleted file mode 100644 index a6b7bafac..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p11.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_11); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p12.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p12.cpp deleted file mode 100644 index 69cbeb7ff..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p12.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_12); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p2.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p2.cpp deleted file mode 100644 index 1e0f25909..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p2.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p3.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p3.cpp deleted file mode 100644 index e4f2c6457..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p4.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p4.cpp deleted file mode 100644 index daabf9325..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p4.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_4); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p5.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p5.cpp deleted file mode 100644 index cadad858e..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p5.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_5); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p6.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p6.cpp deleted file mode 100644 index 7e56f65c7..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p6.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_6); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p7.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p7.cpp deleted file mode 100644 index 85cedcecd..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p7.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_7); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p8.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p8.cpp deleted file mode 100644 index d593889b8..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p8.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_8); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/scalar_p9.cpp b/libnd4j/include/loops/cpu/compilation_units/scalar_p9.cpp deleted file mode 100644 index 14eb788d7..000000000 --- a/libnd4j/include/loops/cpu/compilation_units/scalar_p9.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// Created by raver on 9/28/2018. -// - -#include "../scalar.hpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_9); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_0.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting.cu.in similarity index 89% rename from libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_0.cu rename to libnd4j/include/loops/cuda/compilation_units/broadcasting.cu.in index d7902af87..6349dcfc9 100644 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_0.cu +++ b/libnd4j/include/loops/cuda/compilation_units/broadcasting.cu.in @@ -18,10 +18,10 @@ // @author raver119@gmail.com // -#include "../../broadcasting.chpp" - +#include +#cmakedefine PAIRWISE_TYPE_GEN namespace functions { namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_0); + BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_1.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_1.cu deleted file mode 100644 index b24ebdb6c..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_1.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_10.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_10.cu deleted file mode 100644 index 4d19a893c..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_10.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_10); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_11.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_11.cu deleted file mode 100644 index 8b643965b..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_11.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_11); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_12.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_12.cu deleted file mode 100644 index 935297a53..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_12.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_12); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_2.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_2.cu deleted file mode 100644 index 7d7fdc1b6..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_2.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_3.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_3.cu deleted file mode 100644 index d5c09f114..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_3.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_4.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_4.cu deleted file mode 100644 index f3c64a91a..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_4.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_4); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_5.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_5.cu deleted file mode 100644 index 5ca557a30..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_5.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_5); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_6.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_6.cu deleted file mode 100644 index 9c53e8b36..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_6.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_6); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_7.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_7.cu deleted file mode 100644 index a64b6f0d3..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_7.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_7); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_8.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_8.cu deleted file mode 100644 index 4404fed7c..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_8.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_8); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_9.cu b/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_9.cu deleted file mode 100644 index dbb560f5c..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/broadcasting/broadcasting_9.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../broadcasting.chpp" - -namespace functions { - namespace broadcast { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT Broadcast, , PAIRWISE_TYPES_9); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_0.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise.cu.in similarity index 88% rename from libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_0.cu rename to libnd4j/include/loops/cuda/compilation_units/pairwise.cu.in index e57433ae2..312ed7416 100644 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_0.cu +++ b/libnd4j/include/loops/cuda/compilation_units/pairwise.cu.in @@ -18,10 +18,10 @@ // @author raver119@gmail.com // -#include "../../pairwise.chpp" - +#include +#cmakedefine PAIRWISE_TYPE_GEN namespace functions { namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_0); + BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_1.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_1.cu deleted file mode 100644 index 513a2c056..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_1.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_10.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_10.cu deleted file mode 100644 index fac835b18..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_10.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_10); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_11.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_11.cu deleted file mode 100644 index f01ef7eb3..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_11.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_11); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_12.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_12.cu deleted file mode 100644 index 8cf8c367f..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_12.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_12); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_2.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_2.cu deleted file mode 100644 index 8e0261d14..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_2.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_3.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_3.cu deleted file mode 100644 index 86c23344a..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_3.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_4.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_4.cu deleted file mode 100644 index 1ac28891f..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_4.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_4); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_5.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_5.cu deleted file mode 100644 index 713fe344c..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_5.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_5); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_6.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_6.cu deleted file mode 100644 index 0983be1e9..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_6.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_6); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_7.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_7.cu deleted file mode 100644 index b12d82eac..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_7.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_7); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_8.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_8.cu deleted file mode 100644 index fc1876f3d..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_8.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_8); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_9.cu b/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_9.cu deleted file mode 100644 index f13c28e85..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/pairwise/pairwise_9.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../pairwise.chpp" - -namespace functions { - namespace pairwise_transforms { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT PairWiseTransform, , PAIRWISE_TYPES_9); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce3.cu.in b/libnd4j/include/loops/cuda/compilation_units/reduce3.cu.in new file mode 100644 index 000000000..dd7472836 --- /dev/null +++ b/libnd4j/include/loops/cuda/compilation_units/reduce3.cu.in @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2015-2018 Skymind, Inc. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ******************************************************************************/ + +// +// @author raver119@gmail.com +// + +#include +#cmakedefine FLOAT_TYPE_GEN +namespace functions { + namespace reduce3 { + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES, FLOAT_TYPES_@FL_TYPE_INDEX@); + } +} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_0.cu b/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_0.cu deleted file mode 100644 index d3aeadb5f..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_0.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce3.chpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_1.cu b/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_1.cu deleted file mode 100644 index cfc7cb5f3..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_1.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce3.chpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_2.cu b/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_2.cu deleted file mode 100644 index 754ac9f52..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_2.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce3.chpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_3.cu b/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_3.cu deleted file mode 100644 index 340698b34..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce3/reduce3_3.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce3.chpp" - -namespace functions { - namespace reduce3 { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT Reduce3, , LIBND4J_TYPES, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cpu/compilation_units/reduce_float_1.cpp b/libnd4j/include/loops/cuda/compilation_units/reduce_float.cu.in similarity index 86% rename from libnd4j/include/loops/cpu/compilation_units/reduce_float_1.cpp rename to libnd4j/include/loops/cuda/compilation_units/reduce_float.cu.in index bfa88bc3b..34c2bf8ca 100644 --- a/libnd4j/include/loops/cpu/compilation_units/reduce_float_1.cpp +++ b/libnd4j/include/loops/cuda/compilation_units/reduce_float.cu.in @@ -1,6 +1,5 @@ /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at @@ -19,10 +18,10 @@ // @author raver119@gmail.com // -#include "../reduce/reduce_float.hpp" - +#include +#cmakedefine FLOAT_TYPE_GEN namespace functions { namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_1); + BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_@FL_TYPE_INDEX@); } -} +} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_0.cu b/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_0.cu deleted file mode 100644 index dd893939d..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_0.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce/reduce_float.chpp" - -namespace functions { - namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_0); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_1.cu b/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_1.cu deleted file mode 100644 index 4d98cb61c..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_1.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce/reduce_float.chpp" - -namespace functions { - namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_2.cu b/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_2.cu deleted file mode 100644 index 346627563..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_2.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce/reduce_float.chpp" - -namespace functions { - namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_3.cu b/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_3.cu deleted file mode 100644 index 2852063ad..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/reduce_float/reduce_float_3.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../reduce/reduce_float.chpp" - -namespace functions { - namespace reduce { - BUILD_DOUBLE_TEMPLATE(template class ND4J_EXPORT ReduceFloatFunction, , LIBND4J_TYPES, FLOAT_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_0.cu b/libnd4j/include/loops/cuda/compilation_units/scalar.cu.in similarity index 89% rename from libnd4j/include/loops/cuda/compilation_units/scalar/scalar_0.cu rename to libnd4j/include/loops/cuda/compilation_units/scalar.cu.in index 28f754b14..15608bdd1 100644 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_0.cu +++ b/libnd4j/include/loops/cuda/compilation_units/scalar.cu.in @@ -18,10 +18,10 @@ // @author raver119@gmail.com // -#include "../../scalar.chpp" - +#include +#cmakedefine PAIRWISE_TYPE_GEN namespace functions { namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_0); + BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_@FL_TYPE_INDEX@); } } \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_1.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_1.cu deleted file mode 100644 index fb54e4767..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_1.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_1); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_10.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_10.cu deleted file mode 100644 index e06cad235..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_10.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_10); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_11.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_11.cu deleted file mode 100644 index 3c5549339..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_11.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_11); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_12.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_12.cu deleted file mode 100644 index 7f7f74156..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_12.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_12); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_2.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_2.cu deleted file mode 100644 index af2de5b0e..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_2.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_2); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_3.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_3.cu deleted file mode 100644 index a50cee507..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_3.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_3); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_4.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_4.cu deleted file mode 100644 index 7f99764d8..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_4.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_4); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_5.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_5.cu deleted file mode 100644 index 10e93e14c..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_5.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_5); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_6.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_6.cu deleted file mode 100644 index a1a98cf41..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_6.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_6); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_7.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_7.cu deleted file mode 100644 index f29d26c44..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_7.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_7); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_8.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_8.cu deleted file mode 100644 index 38d275b6f..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_8.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_8); - } -} \ No newline at end of file diff --git a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_9.cu b/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_9.cu deleted file mode 100644 index be7c66956..000000000 --- a/libnd4j/include/loops/cuda/compilation_units/scalar/scalar_9.cu +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../../scalar.chpp" - -namespace functions { - namespace scalar { - BUILD_PAIRWISE_TEMPLATE(template class ND4J_EXPORT ScalarTransform, , PAIRWISE_TYPES_9); - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamax.cpp.in b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamax.cpp.in index 533a94aab..3cefacb37 100644 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamax.cpp.in +++ b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamax.cpp.in @@ -19,10 +19,18 @@ #include + +#cmakedefine LIBND4J_TYPE_GEN + +#if defined(PAIRWISE_TYPE_GEN) || defined(INT_TYPE_GEN) || defined(FLOAT_TYPE_GEN) || defined(LIBND4J_TYPE_GEN) namespace sd { namespace ops { namespace helpers { +#if defined(LIBND4J_TYPE_GEN) BUILD_DOUBLE_TEMPLATE(template void argAbsMax_, (const NDArray& input, NDArray& output, const std::vector& dimensions), LIBND4J_TYPES_@FL_TYPE_INDEX@, INDEXING_TYPES); +#endif + } } -} \ No newline at end of file +} +#endif diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamin.cpp.in b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamin.cpp.in index 4f7c78505..9de76d1de 100644 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamin.cpp.in +++ b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argamin.cpp.in @@ -16,6 +16,7 @@ // // @author AbdelRauf // +#cmakedefine LIBND4J_TYPE_GEN #include diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmax.cpp.in b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmax.cpp.in index 770f155f4..112a91f9f 100644 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmax.cpp.in +++ b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmax.cpp.in @@ -16,6 +16,7 @@ // // @author AbdelRauf // +#cmakedefine LIBND4J_TYPE_GEN #include diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmin.cpp.in b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmin.cpp.in index 0149b890e..ff8ba1bf2 100644 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmin.cpp.in +++ b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/argmin.cpp.in @@ -17,6 +17,8 @@ // @author AbdelRauf // +#cmakedefine LIBND4J_TYPE_GEN + #include namespace sd { diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_3.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize.cpp.in similarity index 84% rename from libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_3.cpp rename to libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize.cpp.in index 11175a02d..b0cdafebd 100644 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_3.cpp +++ b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize.cpp.in @@ -1,5 +1,6 @@ /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. + * Copyright (c) 2020 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at @@ -19,12 +20,14 @@ // #include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" +#include + +#cmakedefine LIBND4J_TYPE_GEN namespace sd { namespace ops { namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_3, FLOAT_TYPES, INTEGER_TYPES); + BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), LIBND4J_TYPES_@FL_TYPE_INDEX@, FLOAT_TYPES, INTEGER_TYPES); } } } \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_0.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_0.cpp deleted file mode 100644 index 22258266b..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_0.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_0, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_1.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_1.cpp deleted file mode 100644 index f2b891d5e..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_1.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_1, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_2.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_2.cpp deleted file mode 100644 index c475d994c..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_2.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_2, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_4.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_4.cpp deleted file mode 100644 index cea328084..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_4.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_4, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_5.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_5.cpp deleted file mode 100644 index 81bb8e897..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_5.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_5, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_6.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_6.cpp deleted file mode 100644 index 415ab39e2..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_6.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_6, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_7.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_7.cpp deleted file mode 100644 index 47d16e6db..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_7.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_7, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_8.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_8.cpp deleted file mode 100644 index 902ade68c..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_8.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_8, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_9.cpp b/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_9.cpp deleted file mode 100644 index 559564903..000000000 --- a/libnd4j/include/ops/declarable/helpers/cpu/compilation_units/crop_and_resize/crop_and_resize_9.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author sgazeos@gmail.com -// - -#include -#include "ops/declarable/helpers/cpu/crop_and_resize.hpp" - -namespace sd { - namespace ops { - namespace helpers { - BUILD_TRIPLE_TEMPLATE(template void cropAndResizeFunctor_, (NDArray const *images, NDArray const *boxes, NDArray const *indices, NDArray const *cropSize, int method, double extrapolationVal, NDArray *crops), NUMERIC_TYPES_9, FLOAT_TYPES, INTEGER_TYPES); - } - } -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_0.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double.cpp.in similarity index 86% rename from libnd4j/include/ops/impl/compilation_units/specials_double_0.cpp rename to libnd4j/include/ops/impl/compilation_units/specials_double.cpp.in index e9d262f58..00e0883f7 100644 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_0.cpp +++ b/libnd4j/include/ops/impl/compilation_units/specials_double.cpp.in @@ -19,10 +19,10 @@ // @author raver119@gmail.com // -#include "../specials_double.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_0); + BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_@FL_TYPE_INDEX@); - BUILD_DOUBLE_TEMPLATE(template void SpecialTypeConverter::convertGeneric, (Nd4jPointer * extras, void *dx, Nd4jLong N, void *dz), LIBND4J_TYPES, LIBND4J_TYPES); + BUILD_DOUBLE_TEMPLATE(template void SpecialTypeConverter::convertGeneric, (Nd4jPointer * extras, void *dx, Nd4jLong N, void *dz), LIBND4J_TYPES, LIBND4J_TYPES_@FL_TYPE_INDEX@); } \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_3.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double_3.cpp deleted file mode 100644 index 7690749bf..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_3.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_double.hpp" - -namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_3); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_4.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double_4.cpp deleted file mode 100644 index 505ea9921..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_4.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_double.hpp" - -namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_4); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_5.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double_5.cpp deleted file mode 100644 index caa9d2dfa..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_5.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_double.hpp" - -namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_5); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_6.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double_6.cpp deleted file mode 100644 index 9646534a9..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_6.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_double.hpp" - -namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_6); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_7.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double_7.cpp deleted file mode 100644 index 3230c1fbc..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_7.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_double.hpp" - -namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_7); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_8.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double_8.cpp deleted file mode 100644 index a56b335b6..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_8.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_double.hpp" - -namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_8); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_double_9.cpp b/libnd4j/include/ops/impl/compilation_units/specials_double_9.cpp deleted file mode 100644 index bb13c0415..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_double_9.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_double.hpp" - -namespace sd { - BUILD_DOUBLE_TEMPLATE(template class DoubleMethods, , LIBND4J_TYPES, LIBND4J_TYPES_9); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_0.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single.cpp.in similarity index 90% rename from libnd4j/include/ops/impl/compilation_units/specials_single_0.cpp rename to libnd4j/include/ops/impl/compilation_units/specials_single.cpp.in index f74717f05..49110d829 100644 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_0.cpp +++ b/libnd4j/include/ops/impl/compilation_units/specials_single.cpp.in @@ -19,8 +19,8 @@ // @author raver119@gmail.com // -#include "../specials_single.hpp" - +#include +#cmakedefine LIBND4J_TYPE_GEN namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_0); + BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_@FL_TYPE_INDEX@); } \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_1.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_1.cpp deleted file mode 100644 index cbacbb60e..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_1.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_1); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_2.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_2.cpp deleted file mode 100644 index b1c7c0db6..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_2.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_2); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_3.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_3.cpp deleted file mode 100644 index d340500e5..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_3.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_3); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_4.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_4.cpp deleted file mode 100644 index b8ea2a933..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_4.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_4); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_5.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_5.cpp deleted file mode 100644 index cc3fe3f0b..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_5.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_5); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_6.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_6.cpp deleted file mode 100644 index 4e0b96a82..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_6.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_6); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_7.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_7.cpp deleted file mode 100644 index e8bd8d950..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_7.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_7); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_8.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_8.cpp deleted file mode 100644 index b2581352e..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_8.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_8); -} \ No newline at end of file diff --git a/libnd4j/include/ops/impl/compilation_units/specials_single_9.cpp b/libnd4j/include/ops/impl/compilation_units/specials_single_9.cpp deleted file mode 100644 index 5105affa8..000000000 --- a/libnd4j/include/ops/impl/compilation_units/specials_single_9.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ - -// -// @author raver119@gmail.com -// - -#include "../specials_single.hpp" - -namespace sd { - BUILD_SINGLE_TEMPLATE(template class SpecialMethods, , LIBND4J_TYPES_9); -} \ No newline at end of file diff --git a/libnd4j/tests_cpu/libnd4j_tests/CMakeLists.txt b/libnd4j/tests_cpu/libnd4j_tests/CMakeLists.txt index 92084ef74..7e01e2847 100644 --- a/libnd4j/tests_cpu/libnd4j_tests/CMakeLists.txt +++ b/libnd4j/tests_cpu/libnd4j_tests/CMakeLists.txt @@ -225,17 +225,12 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT(MINGW) AND NOT(APPLE)) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -export-dynamic") endif() -file(GLOB_RECURSE COMPILATION_UNITS false ../../include/ops/declarable/helpers/cpu/compilation_units/*.cpp.in) -foreach(FL_ITEM ${COMPILATION_UNITS}) - string(REGEX MATCH "^(.*)\\.cpp\.in$" dummy ${FL_ITEM}) - set(FL_ITEM_WLE ${CMAKE_MATCH_1}) - foreach(FL_TYPE_INDEX RANGE 0 9) - #message( "${FL_ITEM_WLE}_${FL_TYPE_INDEX}.cpp") - configure_file( "${FL_ITEM}" "${FL_ITEM_WLE}_${FL_TYPE_INDEX}.cpp" @ONLY) - LIST(APPEND CUSTOMOPS_GENERIC_SOURCES ${FL_ITEM_WLE}_${FL_TYPE_INDEX}.cpp ) - endforeach() -endforeach() + file(GLOB_RECURSE COMPILATION_UNITS false ../include/ops/declarable/helpers/cpu/compilation_units/*.cpp.in + ../include/loops/cpu/compilation_units/*.cpp.in ../include/helpers/cpu/loops/*.cpp.in) + foreach(FL_ITEM ${COMPILATION_UNITS}) + genCompilation(FL_ITEM) + endforeach() # this function strips path from file name, basically making up short file name, i.e. file.cpp function(SHORTNAME LONG_NAME OUTPUT)