This project is read-only.

Applying Cudafy Attribute on Functions

May 23, 2014 at 7:19 AM
Hello there. Hopefully my first post will be answered by Cudafy gurus out there. If FunctionB() is called in FunctionA(), will I be applying Cudafy attribute on both the functions or cudafying just the FunctionA() would be enough? Here are the examples of both scenarios

Scenario 1
[Cudafy]
void FunctionA()
{
   FunctionB();
}
void FunctionB()
{
  // some code
}
Scenario 2
[Cudafy]
void FunctionA()
{
   FunctionB();
}
[Cudafy]
void FunctionB()
{
  // some code
}
What would be done here? Thanks for any comment.
May 23, 2014 at 9:55 AM
Try it and see!
You need to do scenario 2.