Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 34e1cbfa authored by hhakim's avatar hhakim
Browse files

Minor fixes in Faust::Vect<FPP,GPU2>.

Renaming min/max functions to min/max_coeff as in Faust::Vect<FPP,Cpu>.
Correcting mean_relative_error (missing value return).
parent 5837e274
No related branches found
No related tags found
No related merge requests found
......@@ -57,21 +57,21 @@ namespace Faust
}
template<>
FSFG Vect<FSFG,GPU2>::max()
FSFG Vect<FSFG,GPU2>::max_coeff()
{
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(@FAUST_SCALAR_FOR_GM@(0));
FSFG max_coeff;
dsm_funcs->max(this->gpu_mat, &max_coeff);
return max_coeff;
FSFG _max_coeff;
dsm_funcs->max(this->gpu_mat, &_max_coeff);
return _max_coeff;
}
template<>
FSFG Vect<FSFG,GPU2>::min()
FSFG Vect<FSFG,GPU2>::min_coeff()
{
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(@FAUST_SCALAR_FOR_GM@(0));
FSFG min_coeff;
dsm_funcs->min(this->gpu_mat, &min_coeff);
return min_coeff;
FSFG _min_coeff;
dsm_funcs->min(this->gpu_mat, &_min_coeff);
return _min_coeff;
}
template<>
......@@ -152,6 +152,7 @@ namespace Faust
FSFG e;
auto dsm_funcs = GPUModHandler::get_singleton()->dsm_funcs(@FAUST_SCALAR_FOR_GM@(0));
dsm_funcs->mean_relerr(this->get_gpu_mat_ptr(), ref_vec.get_gpu_mat_ptr(), reinterpret_cast<@GM_REINTERPRET_CAST_SCALAR@*>(&e));
return e;
}
......
......@@ -30,8 +30,8 @@ namespace Faust
void operator/=(const Vect<FPP,GPU2> &v);
bool operator==(const Vect<FPP,GPU2> &v)const;
bool operator!=(const Vect<FPP,GPU2> &v)const;
FPP max();
FPP min();
FPP max_coeff();
FPP min_coeff();
FPP dot(const Vect<FPP,GPU2> &v);
FPP sum() const;
FPP mean() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment