-
Notifications
You must be signed in to change notification settings - Fork 70
Labels
enhancementNew feature or requestNew feature or request
Description
Along with binding buffers to kernels we need to be able to set scalar arguments:
SHADER opencl-c my_kernel CLSPV
kernel void foo(global int4* in, global int4* out, int z) {
out[z] = in[z];
END
BUFFER in_buf TYPE int4 DATA
7 4 2 3
END
BUFFER out_buf TYPE int4 SIZE 1
PIPELINE my_pipeline
ATTACH my_kernel
BIND BUFFER foo OPENCL-C KERNEL in_buf ARG in
BIND BUFFER foo OPENCL-C KERNEL out_buf ARG out
SET OPENCL-C DATA KERNEL foo ARG z 2
END
RUN my_pipeline
This would set the z argument to 2 when the pipeline is executed. If there are multiple arguments they may need to get combined into a single POD argument based on what the clspv computer requests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request