CUDA custom property across contact and body force
Hi,
I am writing cuda API and would like to define a particle custom property and a simulation custom property that could be accessed in both calculateForce() and externalForce() on the .cu file. Is it necessary for me to define the property twice on CPU code? To copy the same function: getNumberOfRequiredProperties () getDetailsForProperty() on both cpp files? Do I have to keep the same name and index for the custom property?
Regards,
Qi
Best Answer
-
Hi Qi,
If a custom property is going to be used/accessed by multiple APIs, then each one of those APIs has to declare that custom property in both the getNumberOfRequiredProperties and getDetailsForProperty functions. If the custom property name is not the same in both APIs, then you will have two different custom properties instead of one shared property.
Best regards,
Renan
1
Answers
-
Hi Qi,
If a custom property is going to be used/accessed by multiple APIs, then each one of those APIs has to declare that custom property in both the getNumberOfRequiredProperties and getDetailsForProperty functions. If the custom property name is not the same in both APIs, then you will have two different custom properties instead of one shared property.
Best regards,
Renan
1