correct unit test

This commit is contained in:
Christian Zimmermann 2017-11-15 17:40:31 +01:00
parent 2e4a0be76a
commit 650b41967e
3 changed files with 1 additions and 3 deletions

View file

@ -32,7 +32,6 @@ namespace MultiArrayHelper
static OpFunc f;
if(mRes.size() == 0) { mRes.assign(arg.size(), static_cast<T>(0)); }
assert(mRes.size() == arg.size());
VCHECK(arg);
for(size_t i = 0; i != arg.size(); ++i){
mRes[i] = f(mRes[i], arg[i]);
}

View file

@ -357,7 +357,6 @@ namespace MultiArrayTools
{
BlockBinaryOpSelf<T,std::plus<T>,decltype(mOp.get())> f(mRes);
for(*mInd = 0; mInd->pos() != mInd->max(); ++(*mInd)){
VCHECK(mInd->pos());
f(mOp.get());
}
return mRes;

View file

@ -182,9 +182,9 @@ namespace {
std::cout << "MultiArray time: " << static_cast<double>( end - begin ) / CLOCKS_PER_SEC
<< std::endl;
std::vector<double> res2(vs1*vs2);
std::clock_t begin2 = std::clock();
std::vector<double> res2(vs1*vs2);
for(size_t i = 0; i != vs2; ++i){
for(size_t j = 0; j != vs1; ++j){
res2[i*vs1 + j] = cv1[j] * cv2[i*vs1 + j];