Mentions légales du service

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

Refactor sliceMultiply in C++ code of the python wrapper to make it available for GPU too.

parent 195df869
Branches
Tags
No related merge requests found
......@@ -712,3 +712,11 @@ FPP FaustCoreCpp<FPP,DEV>::get_item(unsigned long int i, unsigned long int j)
return transform->get_item(i, j);
}
template<typename FPP, FDevice DEV>
void FaustCoreCpp<FPP, DEV>::colSliceMultiply(unsigned long int j1, unsigned long int j2, const FPP* data, unsigned long int data_ncols, FPP* out) const
{
Faust::Slice s[2];
s[0] = Faust::Slice(0, this->transform->getNbRow());
s[1] = Faust::Slice(j1, j2);
this->transform->sliceMultiply(s, data, out, data_ncols);
}
......@@ -138,16 +138,6 @@ FaustCoreCpp<@TYPE@,Cpu>* FaustCoreCpp<@TYPE@,Cpu>::read_from_mat_file(const cha
return core;
}
template<>
void FaustCoreCpp<@TYPE@,Cpu>::colSliceMultiply(unsigned long int j1, unsigned long int j2, const @TYPE@* data, unsigned long int data_ncols, @TYPE@* out) const
{
Faust::MatDense<@TYPE@, Cpu> y;
Faust::Slice s[2];
s[0] = Faust::Slice(0, this->transform->getNbRow());
s[1] = Faust::Slice(j1, j2);
this->transform->sliceMultiply(s, data, out, data_ncols);
}
template<>
void FaustCoreCpp<@TYPE@,Cpu>::indexMultiply(unsigned long int* d0_ids, size_t d0_ids_len, unsigned long int* d1_ids, size_t d1_ids_len, const @TYPE@* mat_data, int mat_ncols, @TYPE@* mat_out) const
{
......
......@@ -105,12 +105,6 @@ FaustCoreCpp<@TYPE@,GPU2>* FaustCoreCpp<@TYPE@,GPU2>::read_from_mat_file(const c
return nullptr;
}
template<>
void FaustCoreCpp<@TYPE@,GPU2>::colSliceMultiply(unsigned long int j1, unsigned long int j2, const @TYPE@* data, unsigned long int data_ncols, @TYPE@* out) const
{
throw std::runtime_error("colSliceMultiply is not yet supported on GPU");
}
template<>
void FaustCoreCpp<@TYPE@,GPU2>::indexMultiply(unsigned long int* d0_ids, size_t d0_ids_len, unsigned long int* d1_ids, size_t d1_ids_len, const @TYPE@* mat_data, int mat_ncols, @TYPE@* mat_out) const
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment