This commit is contained in:
Christian Zimmermann 2017-09-11 09:58:03 +02:00
parent 9aac8afcd9
commit e0d00e48a6
2 changed files with 4 additions and 2 deletions

View file

@ -54,6 +54,7 @@ namespace MultiArrayTools
template <typename T> template <typename T>
std::shared_ptr<BlockBase<T> > makeBlock(const std::vector<T>& vec, size_t stepSize, size_t blockSize) std::shared_ptr<BlockBase<T> > makeBlock(const std::vector<T>& vec, size_t stepSize, size_t blockSize)
{ {
VCHECK(stepSize);
if(stepSize == 0){ if(stepSize == 0){
return std::make_shared<BlockValue<T> >(vec, 0, blockSize); return std::make_shared<BlockValue<T> >(vec, 0, blockSize);
} }
@ -68,6 +69,7 @@ namespace MultiArrayTools
template <typename T> template <typename T>
std::shared_ptr<MutableBlockBase<T> > makeBlock(std::vector<T>& vec, size_t stepSize, size_t blockSize) std::shared_ptr<MutableBlockBase<T> > makeBlock(std::vector<T>& vec, size_t stepSize, size_t blockSize)
{ {
VCHECK(stepSize);
if(stepSize == 0){ if(stepSize == 0){
return std::make_shared<MBlockValue<T> >(vec, 0, blockSize); return std::make_shared<MBlockValue<T> >(vec, 0, blockSize);
} }

View file

@ -110,7 +110,7 @@ namespace {
EXPECT_EQ( fabs( res.at('f') - (0.373+8.215) ) < 0.0001, true ); EXPECT_EQ( fabs( res.at('f') - (0.373+8.215) ) < 0.0001, true );
EXPECT_EQ( fabs( res.at('g') - (7.192+5.063) ) < 0.0001, true ); EXPECT_EQ( fabs( res.at('g') - (7.192+5.063) ) < 0.0001, true );
} }
/*
TEST_F(OpTest_MDim, ExecOp1) TEST_F(OpTest_MDim, ExecOp1)
{ {
MultiArray<double,SRange,SRange> res(sr2ptr,sr4ptr); MultiArray<double,SRange,SRange> res(sr2ptr,sr4ptr);
@ -132,7 +132,7 @@ namespace {
EXPECT_EQ( fabs( res.at(mkt('3','B')) - (0.373 * 4.790) ) < 0.0001, true ); EXPECT_EQ( fabs( res.at(mkt('3','B')) - (0.373 * 4.790) ) < 0.0001, true );
} }
/*
TEST_F(OpTest_MDim, ExecOp2) TEST_F(OpTest_MDim, ExecOp2)
{ {
MultiArray<double,MRange,SRange> res(mr1ptr,sr4ptr); MultiArray<double,MRange,SRange> res(mr1ptr,sr4ptr);