rename namespaces

This commit is contained in:
Christian Zimmermann 2021-07-28 20:29:56 +02:00
parent e3d4c34962
commit c5e6003fc9
76 changed files with 148 additions and 148 deletions

View file

@ -12,7 +12,7 @@
#define MIB_SIZE 1024*1024 // 1MiB #define MIB_SIZE 1024*1024 // 1MiB
#define WARN_SIZE MIB_SIZE*100 // 100 MiB #define WARN_SIZE MIB_SIZE*100 // 100 MiB
namespace MultiArrayHelper namespace CNORXZInternal
{ {
template <typename T> template <typename T>
@ -65,12 +65,12 @@ namespace MultiArrayHelper
} }
} // namespace MultiArrayHelper } // namespace CNORXZInternal
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T> template <typename T>
using vector = std::vector<T,MultiArrayHelper::Allocator<T>>; using vector = std::vector<T,CNORXZInternal::Allocator<T>>;
template <typename T> template <typename T>
inline std::vector<T> toStdVec(const vector<T>& v) inline std::vector<T> toStdVec(const vector<T>& v)
@ -84,6 +84,6 @@ namespace MultiArrayTools
return vector<T>(v.begin(), v.end()); return vector<T>(v.begin(), v.end());
} }
} // namespace MultiArrayTools } // namespace CNORXZ
#endif #endif

View file

@ -1,7 +1,7 @@
#include "arith.h" #include "arith.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <class F> template <class F>

View file

@ -4,7 +4,7 @@
#include <functional> #include <functional>
namespace MultiArrayTools namespace CNORXZ
{ {
//template <typename T, class F, typename... As> //template <typename T, class F, typename... As>
@ -206,7 +206,7 @@ namespace MultiArrayTools
} }
}; };
} // end namespace MultiArrayHelper } // end namespace CNORXZInternal
#include "arith.cc.h" #include "arith.cc.h"

View file

@ -3,7 +3,7 @@
#include <string> #include <string>
namespace MultiArrayTools namespace CNORXZ
{ {
// just to fix this forever: // just to fix this forever:

View file

@ -1,7 +1,7 @@
#include "container_index.h" #include "container_index.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T, class... Indices> template <typename T, class... Indices>
@ -437,4 +437,4 @@ namespace MultiArrayTools
return IB::mPos >= it.pos(); return IB::mPos >= it.pos();
} }
} // namespace MultiArrayTools } // namespace CNORXZ

View file

@ -13,7 +13,7 @@
#include "statics/static_for.h" #include "statics/static_for.h"
#include "ranges/range_helper.h" #include "ranges/range_helper.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T, class... Indices> template <typename T, class... Indices>
@ -302,6 +302,6 @@ namespace MultiArrayTools
}; };
} // end namespace MultiArrayTools } // end namespace CNORXZ
#endif #endif

View file

@ -5,7 +5,7 @@
#include "cxz_array.h" #include "cxz_array.h"
#include "slice.h" #include "slice.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace ConversionSizes namespace ConversionSizes

View file

@ -2,7 +2,7 @@
#include "cxz_array.h" #include "cxz_array.h"
#include "statics/static_for.h" #include "statics/static_for.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T> template <typename T>
Scalar<T> scalar(const T& in) Scalar<T> scalar(const T& in)

View file

@ -8,7 +8,7 @@
#include "cxz_array_base.h" #include "cxz_array_base.h"
#include "ranges/anonymous_range.h" #include "ranges/anonymous_range.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T> template <typename T>
struct ArrayCatter; struct ArrayCatter;

View file

@ -1,7 +1,7 @@
#include "cxz_array_base.h" #include "cxz_array_base.h"
namespace MultiArrayTools namespace CNORXZ
{ {
/********************** /**********************
@ -270,5 +270,5 @@ namespace MultiArrayTools
return ConstOperationRoot<T,MappedRanges...>(*this, inds...); return ConstOperationRoot<T,MappedRanges...>(*this, inds...);
} }
} // end namespace MultiArrayTools } // end namespace CNORXZ

View file

@ -13,7 +13,7 @@
#include "ranges/rheader.h" #include "ranges/rheader.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <class IndexType> template <class IndexType>
@ -178,7 +178,7 @@ namespace MultiArrayTools
}; };
} // end namespace MultiArrayTools } // end namespace CNORXZ
/* ========================= * /* ========================= *
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *

View file

@ -8,11 +8,11 @@
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
* ========================= */ * ========================= */
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
/*************************** /***************************

View file

@ -21,12 +21,12 @@
#include "statics/static_for.h" #include "statics/static_for.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
template <typename T, class OperationClass> template <typename T, class OperationClass>

View file

@ -2,7 +2,7 @@
#include "dynamic_operation.h" #include "dynamic_operation.h"
#include "helper_tools.h" #include "helper_tools.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T, class Operation> template <typename T, class Operation>
T DynamicOperation<T,Operation>::get(const DExtT& pos) const T DynamicOperation<T,Operation>::get(const DExtT& pos) const
@ -195,4 +195,4 @@ namespace MultiArrayTools
return std::make_shared<DynamicOuterOp<T,Operation,Ranges...>>(*this); return std::make_shared<DynamicOuterOp<T,Operation,Ranges...>>(*this);
} }
} // namespace MultiArrayTools } // namespace CNORXZ

View file

@ -5,7 +5,7 @@
#include "base_def.h" #include "base_def.h"
#include "cxz_operation.h" #include "cxz_operation.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T> template <typename T>
@ -204,6 +204,6 @@ namespace MultiArrayTools
}; };
*/ */
} // namespace MultiArrayTools } // namespace CNORXZ
#endif #endif

View file

@ -1,7 +1,7 @@
#include "functional_array.h" #include "functional_array.h"
namespace MultiArrayTools namespace CNORXZ
{ {
@ -96,4 +96,4 @@ namespace MultiArrayTools
return mkOperation( mFunc, MetaOperationRoot<SRanges>( inds ) ... ); return mkOperation( mFunc, MetaOperationRoot<SRanges>( inds ) ... );
} }
} // namespace MultiArrayTools } // namespace CNORXZ

View file

@ -5,7 +5,7 @@
#include "cxz_array_base.h" #include "cxz_array_base.h"
#include "slice.h" #include "slice.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T, class Function, class... SRanges> template <typename T, class Function, class... SRanges>
@ -51,7 +51,7 @@ namespace MultiArrayTools
}; };
} // namespace MultiArrayTools } // namespace CNORXZ
/* ========================= * /* ========================= *
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *

View file

@ -1,7 +1,7 @@
#include "helper_tools.h" #include "helper_tools.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename... T> template <typename... T>
std::ostream& operator<<(std::ostream& out, const std::tuple<T...>& tp) std::ostream& operator<<(std::ostream& out, const std::tuple<T...>& tp)

View file

@ -9,7 +9,7 @@
#include <functional> #include <functional>
#include "xfor/iloop.h" #include "xfor/iloop.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename... T> template <typename... T>
@ -173,16 +173,16 @@ namespace MultiArrayTools
auto mkILoop(const OpTp& opTp, const IndTp& indTp, const VarTp& varTp, const LTp& lTp, auto mkILoop(const OpTp& opTp, const IndTp& indTp, const VarTp& varTp, const LTp& lTp,
const std::array<size_t,std::tuple_size<LTp>::value>& umpos, const std::array<size_t,std::tuple_size<LTp>::value>& umpos,
const std::array<size_t,std::tuple_size<VarTp>::value>& setzero) const std::array<size_t,std::tuple_size<VarTp>::value>& setzero)
-> MultiArrayHelper::ILoop<OpTp,IndTp,VarTp,LTp> -> CNORXZInternal::ILoop<OpTp,IndTp,VarTp,LTp>
{ {
return MultiArrayHelper::ILoop<OpTp,IndTp,VarTp,LTp>(opTp, indTp, varTp, lTp, umpos, setzero); return CNORXZInternal::ILoop<OpTp,IndTp,VarTp,LTp>(opTp, indTp, varTp, lTp, umpos, setzero);
} }
template <class CF> template <class CF>
auto mkPILoop(const CF& cf) auto mkPILoop(const CF& cf)
-> MultiArrayHelper::PILoop<CF> -> CNORXZInternal::PILoop<CF>
{ {
return MultiArrayHelper::PILoop<CF>(cf); return CNORXZInternal::PILoop<CF>(cf);
} }
template <class IndexType> template <class IndexType>

View file

@ -1,7 +1,7 @@
#include "high_level_operation.h" #include "high_level_operation.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T, class Op> template <typename T, class Op>

View file

@ -6,7 +6,7 @@
#include "ranges/rheader.h" #include "ranges/rheader.h"
#include "dynamic_operation.h" #include "dynamic_operation.h"
namespace MultiArrayTools namespace CNORXZ
{ {
typedef ClassicRange CR; typedef ClassicRange CR;

View file

@ -2,12 +2,12 @@
#include "map_range.h" #include "map_range.h"
#include <type_traits> #include <type_traits>
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
/************** /**************

View file

@ -18,11 +18,11 @@
#include "xfor/xfor.h" #include "xfor/xfor.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }

View file

@ -8,7 +8,7 @@
#include "ranges/rbase_def.h" #include "ranges/rbase_def.h"
#include "mbase_def.h" #include "mbase_def.h"
namespace MultiArrayTools namespace CNORXZ
{ {
class MapRangeFactoryProductMap class MapRangeFactoryProductMap
{ {

View file

@ -5,7 +5,7 @@
#include "ranges/rbase_def.h" #include "ranges/rbase_def.h"
#include "allocator.h" #include "allocator.h"
namespace MultiArrayTools namespace CNORXZ
{ {
/*********************** /***********************
* Provided Types * * Provided Types *

View file

@ -4,7 +4,7 @@
#include "cxz_operation.h" #include "cxz_operation.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T, class OperationClass> template <typename T, class OperationClass>

View file

@ -11,7 +11,7 @@
#include "ranges/x_to_string.h" #include "ranges/x_to_string.h"
#include "ranges/type_map.h" #include "ranges/type_map.h"
namespace MultiArrayTools namespace CNORXZ
{ {
typedef GenSingleIndex<size_t,SpaceType::ANON,MUI> AnonymousIndex; typedef GenSingleIndex<size_t,SpaceType::ANON,MUI> AnonymousIndex;
@ -133,7 +133,7 @@ namespace MultiArrayTools
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
* ========================= */ * ========================= */
namespace MultiArrayTools namespace CNORXZ
{ {
/*********************** /***********************
@ -171,7 +171,7 @@ namespace MultiArrayTools
std::shared_ptr<AnonymousRange> defaultRange(size_t size = 0); std::shared_ptr<AnonymousRange> defaultRange(size_t size = 0);
} }
namespace MultiArrayTools namespace CNORXZ
{ {
namespace RangeHelper namespace RangeHelper
{ {
@ -202,7 +202,7 @@ namespace MultiArrayTools
} }
} }
namespace MultiArrayTools namespace CNORXZ
{ {
/*********************** /***********************
* AnonymousRange * * AnonymousRange *

View file

@ -7,7 +7,7 @@
#include "allocator.h" #include "allocator.h"
namespace MultiArrayTools namespace CNORXZ
{ {
typedef std::pair<const char*,size_t> DynamicMetaElem; typedef std::pair<const char*,size_t> DynamicMetaElem;
@ -66,6 +66,6 @@ namespace MultiArrayTools
}; };
} // namespace MultiArrayTools } // namespace CNORXZ
#endif #endif

View file

@ -1,11 +1,11 @@
#include "ranges/dynamic_range.h" #include "ranges/dynamic_range.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
@ -186,9 +186,9 @@ namespace MultiArrayTools
} }
} // end namespace MultiArrayTools } // end namespace CNORXZ
namespace MultiArrayTools namespace CNORXZ
{ {
namespace RangeHelper namespace RangeHelper
{ {

View file

@ -17,11 +17,11 @@
#include "index_wrapper.h" #include "index_wrapper.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
class DynamicIndex : public IndexInterface<DynamicIndex,vector<char>> class DynamicIndex : public IndexInterface<DynamicIndex,vector<char>>
@ -223,10 +223,10 @@ namespace MultiArrayTools
}; };
} // namespace MultiArrayTools } // namespace CNORXZ
namespace MultiArrayTools namespace CNORXZ
{ {
namespace RangeHelper namespace RangeHelper
{ {

View file

@ -13,7 +13,7 @@
#include "xfor/xfor.h" #include "xfor/xfor.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <class I, typename MetaType> template <class I, typename MetaType>
@ -106,7 +106,7 @@ namespace MultiArrayTools
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
* ========================= */ * ========================= */
namespace MultiArrayTools namespace CNORXZ
{ {
/********************** /**********************
* IndexInterface * * IndexInterface *

View file

@ -2,7 +2,7 @@
#ifndef __index_type_h__ #ifndef __index_type_h__
#define __index_type_h__ #define __index_type_h__
namespace MultiArrayTools namespace CNORXZ
{ {
enum class IndexType{ enum class IndexType{
SINGLE = 0, SINGLE = 0,

View file

@ -2,7 +2,7 @@
#include "index_wrapper.h" #include "index_wrapper.h"
#include "range_helper.h" #include "range_helper.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <class Index> template <class Index>

View file

@ -6,11 +6,11 @@
#include "xfor/xfor.h" #include "xfor/xfor.h"
#include "ranges/rheader.h" #include "ranges/rheader.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
class IndexWrapperBase class IndexWrapperBase

View file

@ -18,11 +18,11 @@
#include "statics/static_for.h" #include "statics/static_for.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
template <class... Indices> template <class... Indices>
@ -218,12 +218,12 @@ namespace MultiArrayTools
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
* ========================= */ * ========================= */
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
// -> define in range_base.cc // -> define in range_base.cc

View file

@ -7,7 +7,7 @@
#include <map> #include <map>
#include "ranges/rbase_def.h" #include "ranges/rbase_def.h"
namespace MultiArrayTools namespace CNORXZ
{ {
class MultiRangeFactoryProductMap class MultiRangeFactoryProductMap
{ {

View file

@ -9,12 +9,12 @@
#include "rbase_def.h" #include "rbase_def.h"
namespace MultiArrayTools namespace CNORXZ
{ {
class RangeBase; class RangeBase;
} }
namespace MultiArrayTools namespace CNORXZ
{ {
size_t indexId(); size_t indexId();

View file

@ -2,7 +2,7 @@
#ifndef __range_helper_h__ #ifndef __range_helper_h__
#define __range_helper_h__ #define __range_helper_h__
namespace MultiArrayTools namespace CNORXZ
{ {
namespace RangeHelper namespace RangeHelper
{ {
@ -167,7 +167,7 @@ namespace MultiArrayTools
RangeTuple& rtp, size_t off, size_t size, SIZET... sizes) RangeTuple& rtp, size_t off, size_t size, SIZET... sizes)
{ {
constexpr size_t tps = std::tuple_size<RangeTuple>::value; constexpr size_t tps = std::tuple_size<RangeTuple>::value;
::MultiArrayTools::RangeHelper::resolveSetRange(std::get<N>(rtp), orig, off, size); ::CNORXZ::RangeHelper::resolveSetRange(std::get<N>(rtp), orig, off, size);
if constexpr(N < tps-1){ if constexpr(N < tps-1){
resolveRangeType<N+1>(orig, rtp, off+size, sizes...); resolveRangeType<N+1>(orig, rtp, off+size, sizes...);
} }
@ -178,7 +178,7 @@ namespace MultiArrayTools
RangeTuple& rtp, size_t off, size_t size) RangeTuple& rtp, size_t off, size_t size)
{ {
constexpr size_t tps = std::tuple_size<RangeTuple>::value; constexpr size_t tps = std::tuple_size<RangeTuple>::value;
::MultiArrayTools::RangeHelper::resolveSetRange(std::get<N>(rtp), orig, off, size); ::CNORXZ::RangeHelper::resolveSetRange(std::get<N>(rtp), orig, off, size);
} }
template <size_t N, class MetaType, class... Ranges> template <size_t N, class MetaType, class... Ranges>
@ -280,6 +280,6 @@ namespace MultiArrayTools
} }
} // namespace RangeHelper } // namespace RangeHelper
} // namespace MultiArrayTools } // namespace CNORXZ
#endif #endif

View file

@ -10,7 +10,7 @@
#ifndef __range_type_classic_def__ #ifndef __range_type_classic_def__
#define __range_type_classic_def__ #define __range_type_classic_def__
namespace MultiArrayTools namespace CNORXZ
{ {
typedef GenSingleIndex<size_t,SpaceType::NONE,MUI> ClassicIndex; typedef GenSingleIndex<size_t,SpaceType::NONE,MUI> ClassicIndex;

View file

@ -10,7 +10,7 @@ include_range_type(NUL,-2)
#ifndef __range_type_null_def__ #ifndef __range_type_null_def__
#define __range_type_null_def__ #define __range_type_null_def__
namespace MultiArrayTools namespace CNORXZ
{ {
typedef GenSingleIndex<size_t,SpaceType::NUL,0> NullIndex; typedef GenSingleIndex<size_t,SpaceType::NUL,0> NullIndex;

View file

@ -8,7 +8,7 @@ include_range_type(PSPACE,3) // Periodic 1dim space
#ifndef __range_type_space_def__ #ifndef __range_type_space_def__
#define __range_type_space_def__ #define __range_type_space_def__
namespace MultiArrayTools namespace CNORXZ
{ {
// Periodic 1dim space // Periodic 1dim space
typedef GenSingleIndex<int,SpaceType::PSPACE,MUI> XSpaceIndex; typedef GenSingleIndex<int,SpaceType::PSPACE,MUI> XSpaceIndex;

View file

@ -10,7 +10,7 @@ include_range_type(SPIN,2)
#ifndef __range_type_spin_def__ #ifndef __range_type_spin_def__
#define __range_type_spin_def__ #define __range_type_spin_def__
namespace MultiArrayTools namespace CNORXZ
{ {
typedef GenSingleIndex<size_t,SpaceType::SPIN,4> SpinIndex; typedef GenSingleIndex<size_t,SpaceType::SPIN,4> SpinIndex;

View file

@ -17,7 +17,7 @@
#include "allocator.h" #include "allocator.h"
#define MUI static_cast<size_t>(-1) #define MUI static_cast<size_t>(-1)
namespace MultiArrayTools namespace CNORXZ
{ {
template <class R> template <class R>

View file

@ -16,11 +16,11 @@
#include "xfor/for_type.h" #include "xfor/for_type.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
@ -327,7 +327,7 @@ namespace MultiArrayTools
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
* ========================= */ * ========================= */
namespace MultiArrayTools namespace CNORXZ
{ {
/****************** /******************
* GenSingleIndex * * GenSingleIndex *

View file

@ -15,11 +15,11 @@
#include "xfor/for_type.h" #include "xfor/for_type.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
template <class Index> template <class Index>
@ -154,9 +154,9 @@ namespace MultiArrayTools
}; };
} // namespace MultiArrayTools } // namespace CNORXZ
namespace MultiArrayTools namespace CNORXZ
{ {
/***************** /*****************

View file

@ -10,7 +10,7 @@
#include "allocator.h" #include "allocator.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <size_t N> template <size_t N>

View file

@ -17,12 +17,12 @@
#include "xfor/for_type.h" #include "xfor/for_type.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
template <typename U> template <typename U>
@ -138,13 +138,13 @@ namespace MultiArrayTools
ValueRange() = default; ValueRange() = default;
}; };
} // namespace MultiArrayTools } // namespace CNORXZ
/* ========================= * /* ========================= *
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
* ========================= */ * ========================= */
namespace MultiArrayTools namespace CNORXZ
{ {
/***************** /*****************
* ValueIndex * * ValueIndex *
@ -410,6 +410,6 @@ namespace MultiArrayTools
} }
} // namespace MultiArrayTools } // namespace CNORXZ
#endif #endif

View file

@ -10,7 +10,7 @@
#include "ranges/dynamic_meta.h" #include "ranges/dynamic_meta.h"
namespace MultiArrayHelper namespace CNORXZInternal
{ {
template <typename T> template <typename T>
inline std::string xToString(const T& x); inline std::string xToString(const T& x);
@ -22,7 +22,7 @@ namespace MultiArrayHelper
template <> template <>
inline std::string xToString<std::string>(const std::string& x); inline std::string xToString<std::string>(const std::string& x);
using MultiArrayTools::DynamicMetaT; using CNORXZ::DynamicMetaT;
template <> template <>
inline std::string xToString<DynamicMetaT>(const DynamicMetaT& x); inline std::string xToString<DynamicMetaT>(const DynamicMetaT& x);

View file

@ -1,7 +1,7 @@
#include "slice.h" #include "slice.h"
namespace MultiArrayTools namespace CNORXZ
{ {
/******************* /*******************
@ -296,5 +296,5 @@ namespace MultiArrayTools
} }
} // end namespace MultiArrayTools } // end namespace CNORXZ

View file

@ -5,7 +5,7 @@
#include "cxz_array_base.h" #include "cxz_array_base.h"
#include "cxz_operation.h" #include "cxz_operation.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T, class... SRanges> template <typename T, class... SRanges>
class ConstSlice : public MultiArrayBase<T,SRanges...> class ConstSlice : public MultiArrayBase<T,SRanges...>
@ -188,7 +188,7 @@ namespace MultiArrayTools
return SliceDef<T,Ranges...>::mkSlice(ind, op); return SliceDef<T,Ranges...>::mkSlice(ind, op);
} }
} // end namespace MultiArrayTools } // end namespace CNORXZ
/* ========================= * /* ========================= *
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *

View file

@ -4,7 +4,7 @@
#include <cstdlib> #include <cstdlib>
namespace MultiArrayTools namespace CNORXZ
{ {
template <size_t BEG, size_t END, int OFF, typename Incr, typename F> template <size_t BEG, size_t END, int OFF, typename Incr, typename F>
inline auto sfor(Incr incr, F f) inline auto sfor(Incr incr, F f)
@ -94,7 +94,7 @@ namespace MultiArrayTools
#define MA_DEC [&](auto i) constexpr { return i-1; } #define MA_DEC [&](auto i) constexpr { return i-1; }
#define MA_ZCONC [&](auto a, auto b) { return 0; } #define MA_ZCONC [&](auto a, auto b) { return 0; }
namespace MultiArrayTools namespace CNORXZ
{ {
template <size_t BEG, size_t END, typename F> template <size_t BEG, size_t END, typename F>
inline auto sfor_p(F f) inline auto sfor_p(F f)

View file

@ -1,7 +1,7 @@
#include "base_def.h" #include "base_def.h"
namespace MultiArrayTools namespace CNORXZ
{ {
template <typename T> template <typename T>

View file

@ -13,11 +13,11 @@
#include <cmath> #include <cmath>
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
// MultiArray // MultiArray
@ -518,6 +518,6 @@ namespace MultiArrayTools
return out; return out;
} }
} // namespace MultiArrayTools } // namespace CNORXZ
#endif #endif

View file

@ -4,7 +4,7 @@
#include <array> #include <array>
namespace MultiArrayHelper namespace CNORXZInternal
{ {
struct None; struct None;
@ -375,13 +375,13 @@ namespace MultiArrayHelper
return getX<I>(et).get(); return getX<I>(et).get();
} }
} // end namespace MultiArrayHelper } // end namespace CNORXZInternal
/* ========================= * /* ========================= *
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
* ========================= */ * ========================= */
namespace MultiArrayHelper namespace CNORXZInternal
{ {
template <class X> template <class X>
@ -517,7 +517,7 @@ namespace MultiArrayHelper
return getX<N>(*this); return getX<N>(*this);
} }
} // end namespace MultiArrayHelper } // end namespace CNORXZInternal
#endif #endif

View file

@ -2,7 +2,7 @@
#ifndef __for_type_h__ #ifndef __for_type_h__
#define __for_type_h__ #define __for_type_h__
namespace MultiArrayHelper namespace CNORXZInternal
{ {
enum class ForType { enum class ForType {
@ -17,7 +17,7 @@ namespace MultiArrayHelper
class PFor; class PFor;
} // end namespace MultiArrayHelper } // end namespace CNORXZInternal
#endif #endif

View file

@ -6,7 +6,7 @@
#include <array> #include <array>
#include <tuple> #include <tuple>
namespace MultiArrayHelper namespace CNORXZInternal
{ {
namespace { namespace {
template <class Op> template <class Op>
@ -34,6 +34,6 @@ namespace MultiArrayHelper
}; };
} // end namespace MultiArrayHelper } // end namespace CNORXZInternal
#endif #endif

View file

@ -9,7 +9,7 @@
#include <omp.h> #include <omp.h>
#include "xfor.h" #include "xfor.h"
namespace MultiArrayHelper namespace CNORXZInternal
{ {
template <size_t N> template <size_t N>
struct NN struct NN

View file

@ -15,9 +15,9 @@
#define VCHECK(a) std::cout << __FILE__ << ": @" << __LINE__ \ #define VCHECK(a) std::cout << __FILE__ << ": @" << __LINE__ \
<< " in " << __func__ << ": " << #a << " = " << a << std::endl; << " in " << __func__ << ": " << #a << " = " << a << std::endl;
namespace MultiArrayHelper namespace CNORXZInternal
{ {
using namespace MultiArrayTools; using namespace CNORXZ;
// 'HIDDEN FOR' CLASS for nested for loops in contractions a.s.o. // 'HIDDEN FOR' CLASS for nested for loops in contractions a.s.o.
// (NO COUNTING OF MASTER POSITION !!!!!) // (NO COUNTING OF MASTER POSITION !!!!!)
@ -562,7 +562,7 @@ namespace MultiArrayHelper
}; };
} // namespace MultiArrayHelper } // namespace CNORXZInternal
/* ========================= * /* ========================= *
* --- TEMPLATE CODE --- * * --- TEMPLATE CODE --- *
@ -570,7 +570,7 @@ namespace MultiArrayHelper
#include <iostream> #include <iostream>
namespace MultiArrayHelper namespace CNORXZInternal
{ {
template <class ExtType> template <class ExtType>
const ExtType& ExtBase::expl() const const ExtType& ExtBase::expl() const
@ -1035,6 +1035,6 @@ namespace MultiArrayHelper
} // namespace MultiArrayHelper } // namespace CNORXZInternal
#endif #endif

View file

@ -2,7 +2,7 @@
#include "cnorxz.h" #include "cnorxz.h"
#include "hl_cnorxz.h" #include "hl_cnorxz.h"
namespace MultiArrayTools namespace CNORXZ
{ {
std::shared_ptr<DynamicIndex> mkSubSpaceX(const std::shared_ptr<DynamicIndex>& di, std::shared_ptr<DynamicIndex> mkSubSpaceX(const std::shared_ptr<DynamicIndex>& di,
size_t max) size_t max)

View file

@ -1,7 +1,7 @@
#include "map_range_factory_product_map.h" #include "map_range_factory_product_map.h"
namespace MultiArrayTools namespace CNORXZ
{ {
std::map<std::shared_ptr<RangeBase>,vector<std::intptr_t> > MapRangeFactoryProductMap::mAleadyCreated; std::map<std::shared_ptr<RangeBase>,vector<std::intptr_t> > MapRangeFactoryProductMap::mAleadyCreated;
} }

View file

@ -12,7 +12,7 @@ for x in $(cat ../include/extensions/math.h) ; do
echo "#include \"cnorxz.h\"" >> ${file} echo "#include \"cnorxz.h\"" >> ${file}
echo "#include \"hl_cnorxz.h\"" >> ${file} echo "#include \"hl_cnorxz.h\"" >> ${file}
echo "" >> ${file} echo "" >> ${file}
echo "namespace MultiArrayTools" >> ${file} echo "namespace CNORXZ" >> ${file}
echo "{" >> ${file} echo "{" >> ${file}
echo " template class HighLevelOp<OpCD,x_${fff}<double>,1>;" >> ${file} echo " template class HighLevelOp<OpCD,x_${fff}<double>,1>;" >> ${file}
echo " template class HighLevelOp<OpD,x_${fff}<double>,1>;" >> ${file} echo " template class HighLevelOp<OpD,x_${fff}<double>,1>;" >> ${file}
@ -27,7 +27,7 @@ for fff in plus minus multiplies divides ; do
echo "#include \"cnorxz.h\"" >> ${file} echo "#include \"cnorxz.h\"" >> ${file}
echo "#include \"hl_cnorxz.h\"" >> ${file} echo "#include \"hl_cnorxz.h\"" >> ${file}
echo "" >> ${file} echo "" >> ${file}
echo "namespace MultiArrayTools" >> ${file} echo "namespace CNORXZ" >> ${file}
echo "{" >> ${file} echo "{" >> ${file}
echo " template class HighLevelOp<OpCD,${fff}x<double,double>,2>;" >> ${file} echo " template class HighLevelOp<OpCD,${fff}x<double,double>,2>;" >> ${file}
echo " template class HighLevelOp<OpD,${fff}x<double,double>,2>;" >> ${file} echo " template class HighLevelOp<OpD,${fff}x<double,double>,2>;" >> ${file}
@ -40,7 +40,7 @@ for fff in negate ; do
echo "#include \"cnorxz.h\"" >> ${file} echo "#include \"cnorxz.h\"" >> ${file}
echo "#include \"hl_cnorxz.h\"" >> ${file} echo "#include \"hl_cnorxz.h\"" >> ${file}
echo "" >> ${file} echo "" >> ${file}
echo "namespace MultiArrayTools" >> ${file} echo "namespace CNORXZ" >> ${file}
echo "{" >> ${file} echo "{" >> ${file}
echo " template class HighLevelOp<OpCD,${fff}<double>,1>;" >> ${file} echo " template class HighLevelOp<OpCD,${fff}<double>,1>;" >> ${file}
echo " template class HighLevelOp<OpD,${fff}<double>,1>;" >> ${file} echo " template class HighLevelOp<OpD,${fff}<double>,1>;" >> ${file}

View file

@ -3,7 +3,7 @@
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
#include "ma_assert.h" #include "ma_assert.h"
namespace MultiArrayTools namespace CNORXZ
{ {
/****************************** /******************************
* AnonymousRangeFactory * * AnonymousRangeFactory *
@ -294,4 +294,4 @@ namespace MultiArrayTools
} // end namespace MultiArrayTools } // end namespace CNORXZ

View file

@ -4,7 +4,7 @@
#include "ranges/dynamic_meta.h" #include "ranges/dynamic_meta.h"
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
namespace MultiArrayTools namespace CNORXZ
{ {
/********************* /*********************
@ -45,4 +45,4 @@ namespace MultiArrayTools
} // namespace MultiArrayTools } // namespace CNORXZ

View file

@ -3,11 +3,11 @@
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
#include "ma_assert.h" #include "ma_assert.h"
namespace MultiArrayTools namespace CNORXZ
{ {
namespace namespace
{ {
using namespace MultiArrayHelper; using namespace CNORXZInternal;
} }
@ -484,5 +484,5 @@ namespace MultiArrayTools
return mOrig; return mOrig;
} }
} // end namespace MultiArrayTools } // end namespace CNORXZ

View file

@ -2,7 +2,7 @@
#include "ranges/multi_range_factory_product_map.h" #include "ranges/multi_range_factory_product_map.h"
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
namespace MultiArrayTools namespace CNORXZ
{ {
std::map<std::shared_ptr<RangeBase>,vector<std::intptr_t> > MultiRangeFactoryProductMap::mAleadyCreated; std::map<std::shared_ptr<RangeBase>,vector<std::intptr_t> > MultiRangeFactoryProductMap::mAleadyCreated;
} }

View file

@ -11,10 +11,10 @@
#include <algorithm> #include <algorithm>
namespace MultiArrayTools namespace CNORXZ
{ {
//using namespace MultiArrayHelpers; //using namespace CNORXZInternals;
template <class... Ranges> template <class... Ranges>
using STP = std::tuple<std::shared_ptr<Ranges>...>; using STP = std::tuple<std::shared_ptr<Ranges>...>;
@ -215,4 +215,4 @@ namespace MultiArrayTools
return reinterpret_cast<std::intptr_t>(this); return reinterpret_cast<std::intptr_t>(this);
} }
} // end namespace MultiArrayTools } // end namespace CNORXZ

View file

@ -3,7 +3,7 @@
#include "ranges/x_to_string.h" #include "ranges/x_to_string.h"
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
namespace MultiArrayTools namespace CNORXZ
{ {
/******************** /********************
* GenSingleRange * * GenSingleRange *

View file

@ -3,7 +3,7 @@
#include "ranges/x_to_string.h" #include "ranges/x_to_string.h"
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
namespace MultiArrayTools namespace CNORXZ
{ {
std::shared_ptr<NullRF> mkNUL(const char* dp, size_t size) std::shared_ptr<NullRF> mkNUL(const char* dp, size_t size)
{ {

View file

@ -3,7 +3,7 @@
#include "ranges/x_to_string.h" #include "ranges/x_to_string.h"
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
namespace MultiArrayTools namespace CNORXZ
{ {
std::shared_ptr<PSpaceRF> mkPSPACE(const char* dp, size_t size) std::shared_ptr<PSpaceRF> mkPSPACE(const char* dp, size_t size)
{ {

View file

@ -3,7 +3,7 @@
#include "ranges/x_to_string.h" #include "ranges/x_to_string.h"
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
namespace MultiArrayTools namespace CNORXZ
{ {
std::shared_ptr<SpinRF> mkSPIN(const char* dp, size_t size) std::shared_ptr<SpinRF> mkSPIN(const char* dp, size_t size)
{ {

View file

@ -2,7 +2,7 @@
#include "ranges/type_map.h" #include "ranges/type_map.h"
#include "ranges/ranges_header.cc.h" #include "ranges/ranges_header.cc.h"
namespace MultiArrayTools namespace CNORXZ
{ {
#define XCOMMAX() , #define XCOMMAX() ,
#define include_type(t,n) template struct TypeMap<n>; \ #define include_type(t,n) template struct TypeMap<n>; \

View file

@ -6,7 +6,7 @@
#include "cnorxz.h" #include "cnorxz.h"
namespace MAT = MultiArrayTools; namespace MAT = CNORXZ;
namespace { namespace {

View file

@ -13,7 +13,7 @@
#define ONLY_SPIN #define ONLY_SPIN
namespace MAT = MultiArrayTools; namespace MAT = CNORXZ;
namespace { namespace {

View file

@ -8,7 +8,7 @@
#include "cnorxz.h" #include "cnorxz.h"
//#include "ranges/ranges_header.cc.h" //#include "ranges/ranges_header.cc.h"
namespace MAT = MultiArrayTools; namespace MAT = CNORXZ;
namespace { namespace {

View file

@ -6,7 +6,7 @@
#include "cnorxz.h" #include "cnorxz.h"
namespace MAT = MultiArrayTools; namespace MAT = CNORXZ;
namespace { namespace {

View file

@ -9,7 +9,7 @@
#include <ctime> #include <ctime>
#include <cmath> #include <cmath>
namespace MAT = MultiArrayTools; namespace MAT = CNORXZ;
double xround(double arg) double xround(double arg)
{ {