15#include "gtest/gtest.h"
27 class OpCont_CR_Test :
public ::testing::Test
35 mData1 = Numbers::get(
off, mSize);
36 mData2 = Numbers::get(
off + mSize*2, mSize);
38 mCI1 = std::make_shared<CIndex>(cr);
39 mCI2 = std::make_shared<CIndex>(cr);
41 mOp2.init(mData1.data(), mCI1);
43 mOp4.init(mData2.data(), mCI2);
57 class OpCont_CR_CR_Test :
public ::testing::Test
68 mData1 = Numbers::get(
off, mSize1);
69 mData2 = Numbers::get(
off += mSize1 , mSize2);
70 mData11 = Numbers::get(
off += mSize2, mSize1*mSize2);
71 mData12 = Numbers::get(
off += mSize1*mSize2, mSize1*mSize2);
74 mCI1i = std::make_shared<CIndex>(
cr1);
75 mCI1j = std::make_shared<CIndex>(
cr1);
76 mCI2i = std::make_shared<CIndex>(
cr2);
77 mCI2j = std::make_shared<CIndex>(
cr2);
82 mOC1i1j.init(mCC1i1j);
83 mOR1j1i.init(mData11.data(), mCC1j1i);
84 mOR1i1j.init(mData12.data(), mCC1i1j);
108 class OpCont_CR_CR_Test2 :
public ::testing::Test
123 mData21 = Numbers::get(
off += mSize2, mSize1*mSize2);
124 mData12 = Numbers::get(
off += mSize1*mSize2, mSize1*mSize2);
127 mCI1i = std::make_shared<CIndex>(
cr1);
128 mCI1j = std::make_shared<CIndex>(
cr1);
129 mCI2i = std::make_shared<CIndex>(
cr2);
130 mCI2j = std::make_shared<CIndex>(
cr2);
136 mOC1i2j.init(mCC1i2j);
137 mOR2j1i.init(mData21.data(), mCC2j1i);
138 mOR1i2j.init(mData12.data(), mCC1i2j);
162 auto rs11 = mOp1.rootSteps(mCI1->id());
163 auto rs21 = mOp2.rootSteps(mCI1->id());
164 auto rs31 = mOp3.rootSteps(mCI1->id());
165 auto rs41 = mOp4.rootSteps(mCI1->id());
166 auto rs12 = mOp1.rootSteps(mCI2->id());
167 auto rs22 = mOp2.rootSteps(mCI2->id());
168 auto rs32 = mOp3.rootSteps(mCI2->id());
169 auto rs42 = mOp4.rootSteps(mCI2->id());
219 EXPECT_EQ(mOC1i1j.rootSteps(mCI1i->id()).val(), mCI1j->pmax().val());
220 EXPECT_EQ(mOC1i1j.rootSteps(mCI1j->id()).val(), 1u);
221 EXPECT_EQ(mOR1j1i.rootSteps(mCI1i->id()).val(), 1u);
222 EXPECT_EQ(mOR1j1i.rootSteps(mCI1j->id()).val(), mCI1i->pmax().val());
228 for(
SizeT i = 0;
i != mCI1i->pmax().val(); ++
i){
229 for(
SizeT j = 0;
j != mCI1j->pmax().val(); ++
j){
230 const SizeT jS = mCI1j->pmax().val();
231 const SizeT iS = mCI1i->pmax().val();
239 mOC1i1j = mOR1j1i * mOR1i1j;
240 for(
SizeT i = 0;
i != mCI1i->pmax().val(); ++
i){
241 for(
SizeT j = 0;
j != mCI1j->pmax().val(); ++
j){
242 const SizeT jS = mCI1j->pmax().val();
243 const SizeT iS = mCI1i->pmax().val();
257 for(
SizeT i = 0;
i != mCI1i->pmax().val(); ++
i){
258 for(
SizeT j = 0;
j != mCI2j->pmax().val(); ++
j){
259 const SizeT jS = mCI2j->pmax().val();
260 const SizeT iS = mCI1i->pmax().val();
277 mOC1i2j = mOR2j1i * mOR1i2j;
278 for(
SizeT i = 0;
i != mCI1i->pmax().val(); ++
i){
279 for(
SizeT j = 0;
j != mCI2j->pmax().val(); ++
j){
280 const SizeT jS = mCI2j->pmax().val();
281 const SizeT iS = mCI1i->pmax().val();
constexpr decltype(auto) gmindexPtr(const FormatT &bs, const SPack< Indices... > &pack)
std::vector< T, Allocator< T > > Vector
std::integral_constant< SizeT, N > CSizeT
Sptr< Range > rangeCast(const RangePtr r)
constexpr decltype(auto) gmformat(const PosT &... ps)
constexpr decltype(auto) mindexPtr(const SPack< Indices... > &pack)
std::shared_ptr< T > Sptr