diff --git a/src/include/statics/static_for.h b/src/include/statics/static_for.h new file mode 100644 index 0000000..fb12618 --- /dev/null +++ b/src/include/statics/static_for.h @@ -0,0 +1,68 @@ + +#ifndef __static_for_h__ +#define __static_for_h__ + +#include + +namespace MultiArrayTools +{ + + template + struct sfor + { + template + static void execs(const F& f) + { + if(BEG < END){ + f(std::integral_constant{}); + sfor::execs(f); + } + } + + template + static void execsr(const F& f) + { + if(BEG < END){ + f(std::integral_constant{}); + sfor::execsr(f); + } + } + + template + static void exec(const F& f) + { + f(std::integral_constant{}); + sfor::exec(f); + } + + template + static void execr(const F& f) + { + f(std::integral_constant{}); + sfor::execr(f); + } + }; + + template + struct sfor + { + template + static void execs(const F& f) {} + + template + static void execsr(const F& f) {} + + template + static void exec(const F& f) {} + + template + static void execr(const F& f) {} + }; +} + +#define MA_SSFOR(i,beg,end,expr) MultiArrayTools::sfor::execs([&](auto i){ expr }) +#define MA_SSRFOR(i,end,beg,expr) MultiArrayTools::sfor::execsr([&](auto i){ expr }) +#define MA_SFOR(i,beg,end,expr) MultiArrayTools::sfor::exec([&](auto i){ expr }) +#define MA_SRFOR(i,end,beg,expr) MultiArrayTools::sfor::execr([&](auto i){ expr }) + +#endif diff --git a/src/name_map.txt b/src/name_map.txt new file mode 100644 index 0000000..f38a7a5 --- /dev/null +++ b/src/name_map.txt @@ -0,0 +1,7 @@ +:: Rename MultiArray library in CNORXZ (Containers with Native Operation Routines by XZ (chizeta)) +MultiArrayTools -> CNORXZ +MultiArray -> Array +multi_array_*.{cc,h} -> cxz_*.{cc,h} +*ma* -> *cxz* +libmultiarray -> libcnorxz +...!!!