hl_reg_ind.h
This commit is contained in:
parent
e3afa8b8c1
commit
3d9cd65389
2 changed files with 41 additions and 10 deletions
|
@ -37,9 +37,19 @@ namespace MultiArrayTools
|
|||
};
|
||||
|
||||
virtual bool root() const = 0;
|
||||
|
||||
virtual RetT<CI,CI> create(const std::shared_ptr<CI>& ind1,
|
||||
const std::shared_ptr<CI>& ind2) = 0;
|
||||
|
||||
#define reg_ind1(I1) virtual RetT<I1> create \
|
||||
(const std::shared_ptr<I1>& ind1) = 0
|
||||
#define reg_ind2(I1,I2) virtual RetT<I1,I2> create \
|
||||
(const std::shared_ptr<I1>& ind1,const std::shared_ptr<I2>& ind2) = 0
|
||||
#define reg_ind3(I1,I2,I3) virtual RetT<I1,I2,I3> create \
|
||||
(const std::shared_ptr<I1>& ind1,const std::shared_ptr<I2>& ind2,const std::shared_ptr<I3>& ind3) = 0
|
||||
|
||||
#include "hl_reg_ind.h"
|
||||
|
||||
#undef reg_ind1
|
||||
#undef reg_ind2
|
||||
#undef reg_ind3
|
||||
|
||||
virtual const ROP* get() const = 0;
|
||||
|
||||
|
@ -61,9 +71,17 @@ namespace MultiArrayTools
|
|||
|
||||
virtual bool root() const override final;
|
||||
|
||||
virtual typename B::template RetT<CI,CI>
|
||||
create(const std::shared_ptr<CI>& ind1,
|
||||
const std::shared_ptr<CI>& ind2) override final { return xcreate(ind1,ind2); }
|
||||
#define reg_ind1(I1) virtual typename B::template RetT<I1> create \
|
||||
(const std::shared_ptr<I1>& ind1) \
|
||||
override final { return xcreate(ind1); }
|
||||
#define reg_ind2(I1,I2) virtual typename B::template RetT<I1,I2> create \
|
||||
(const std::shared_ptr<I1>& ind1, const std::shared_ptr<I2>& ind2) \
|
||||
override final { return xcreate(ind1,ind2); }
|
||||
#define reg_ind3(I1,I2,I3) virtual typename B::template RetT<I1,I2,I3> create \
|
||||
(const std::shared_ptr<I1>& ind1, const std::shared_ptr<I2>& ind2, const std::shared_ptr<I3>& ind3) \
|
||||
override final { return xcreate(ind1,ind2,ind3); }
|
||||
|
||||
#include "hl_reg_ind.h"
|
||||
|
||||
virtual const ROP* get() const override final;
|
||||
|
||||
|
@ -98,10 +116,11 @@ namespace MultiArrayTools
|
|||
|
||||
virtual const ROP* get() const override final;
|
||||
|
||||
virtual typename B::template RetT<CI,CI>
|
||||
create(const std::shared_ptr<CI>& ind1,
|
||||
const std::shared_ptr<CI>& ind2) override final { return xcreate(ind1,ind2); }
|
||||
|
||||
#include "hl_reg_ind.h"
|
||||
|
||||
#undef reg_ind1
|
||||
#undef reg_ind2
|
||||
#undef reg_ind3
|
||||
};
|
||||
|
||||
|
||||
|
|
12
src/include/hl_reg_ind.h
Normal file
12
src/include/hl_reg_ind.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
#ifdef reg_ind1
|
||||
#ifdef reg_ind2
|
||||
#ifdef reg_ind3
|
||||
|
||||
reg_ind1(ClassicRange::IndexType);
|
||||
reg_ind2(ClassicRange::IndexType,ClassicRange::IndexType);
|
||||
reg_ind3(ClassicRange::IndexType,ClassicRange::IndexType,ClassicRange::IndexType);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in a new issue