I was wondering if it’s possible to call the same kernel functions from different .cu files. I mean, my program has different classes and all of them has some common functions, but with different size memory; for example:
void Bitmap8::Or(const Bitmap8 &b1, const Bitmap8 &b2);
// the function above is as same as this one (of course they are in two different files)
void Bitmap4::Or(const Bitmap4 &b1, const Bitmap4 &b2);
Both of them has different memory size allocation. I created a unique CUDA kernel for them for executing the operations. Is it possible that could be some conflict whereas I’m compiling the program ? because I’m having all the time those kind of errors:
1>Bitmap8.cu.obj : error LNK2005: "void * __cdecl big_random_block(int)" (?big_random_block@@YAPAXH@Z) already defined in Bitmap4.cu.obj
And there are a lot of them
Thank you in advance
Yes it is possibile call the same functions from different files. My errors were related to a double inclusion of an header! Problem solved