-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, to outline a GPU kernel, we pass variables by pointer regardless and then dereference them. Therefore, symbol renaming is always required. However, this is only sometimes necessary. If we pass a private variable that won't be shared between threads, we can pass them by value. Then the outlined kernel doesn't have to rename them.
For shared variables and arrays, we still pass them by the pointer.
To sum up:
private: No need to pass anything to the kernel. Declare a local variable using the original name without initialization.fistprivate: Pass the original value to the kernel using a different name. Declare a local variable using the original name, which is initialized with passed value.shared: Pass the original variable by pointer. It needs renaming.lastprivate: The same asshared. We need to store the final value back to the original variable.map: We can use the original name for arrays. But for scalars, it may need to be shared between different kernels. In that case, they need renaming likesharedclause.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request