You can call the same function from different files (functions) You should have though correct parameters.
Up vote -2 down vote favorite share g+ share fb share tw.
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. Any help is appriciate :) Thank you in advance c++ linker cuda link|improve this question edited Apr 5 at 12:53 asked Apr 5 at 12:47Dado94 100% accept rate.
I hope you are not including Bitmap8. Cu and Bitmap4. Cu in each other?
– Ashwin Apr 5 at 13:11 I don't know! Actually, that's the point of my question...I can't understand what it means! Inside the kernel function there is just a for loop!
Anyway, Bitmpa8. Cu and Bitmap4. Cu are not included in each other.
In this post there is a more explanation of my problem which a different question – talonmies Apr 5 at 14:25 @talonmies: I already solved. Thank you anyway – Dado Apr 5 at 14:31.
You can call the same function from different files (functions) You should have though correct parameters. For example in one file you can #define malloc_size 20 and in another file #define malloc_size 20176 and every time call malloc_size which will be different in each file.. I think you should take a look in your code again and clarify what it does. Start from something simple.
Regards.
Yes it is possibile call the same functions from different files. My errors were related to a double inclusion of an header! Problem solved.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.