rcpparrayfire icon indicating copy to clipboard operation
rcpparrayfire copied to clipboard

rcpparrayfire template support

Open hakantekbas opened this issue 3 years ago • 2 comments

Hi;

Is it possible to use template in rcpparrayfire. I could not see an example. If we can, can you share an example?

Thanks.

hakantekbas avatar Jun 09 '21 09:06 hakantekbas

Can you be a bit more specific what you are trying to do?

In principle, you can use any C++ construct you like. However, the interface to R is limited to R's C API.

rstub avatar Jun 10 '21 08:06 rstub

I'm trying to write a code that can handle integer or numeric (double) vector.

template<typename T, int RTYPE>
Vector<RTYPE> maxMinMedianGroupBy(Vector<RTYPE> data,IntegerVector grp,std::string funcTip) {
..........
}

hakantekbas avatar Jun 10 '21 08:06 hakantekbas