Package com.aparapi
Annotation Type Kernel.PrivateMemorySpace
-
@Retention(RUNTIME) @Target(FIELD) public static @interface Kernel.PrivateMemorySpaceWe can use this Annotation to 'tag' __private (unshared) array fields. Data in the __private address space in OpenCL is accessible only from the current kernel instance. To so mark a field with a buffer size of 99, we can either annotate the buffer
Or use a special suffix@PrivateMemorySpace(99) int[] buffer = new int[99];int[] buffer_$private$99 = new int[99];Note that any code which must be runnable in
. Please seeKernel.EXECUTION_MODE.JTPwill fail to work correctly if it uses such an array, as the array will be shared by all threads. The solution is to create aKernel.NoCLmethod called at the start ofKernel.run()which sets the field to an array returned from a staticThreadLocalMedianKernel7x7in the samples for an example.- See Also:
Kernel.PRIVATE_SUFFIX
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description intvalueSize of the array used as __private buffer.
-