I'm working on a C++ written code and trying to convert it to be C to build on an embedded platform.
I wondering how to convert templates effectively to do the same function in C without changing the rest of the code.
here is an example file from my project:
template <typename T,int width,int depth>
void relu(T arr[][width][depth],T layermap[][width][depth]){
for(int k=0;k<depth;k++)
{
for(int j=0;j<width;j++)
{
for (int i=0;i<width;i++)
{
/*max*/
layermap[i][j][k]=((arr[i][j][k]>0)? arr[i][j][k]:0);
}
}
}
}