concept size in category opencl

appears as: size, size, sizes, The size, sizes
OpenCL in Action: How to Accelerate Graphics and Computation

This is an excerpt from Manning's book OpenCL in Action: How to Accelerate Graphics and Computation.

To create a program from multiple text files, the content of each file must be placed in an array of strings (char**). The src_num parameter tells the function how many strings to expect, and src_sizes identifies the size of each string.

We can generate as many work-items as we like, but the size of each work-group is beyond our control—it depends on the device’s resources and the kernel’s resource usage. The more private and local memory the kernel requires, the fewer work-items can be placed in a work-group. The clGetKernelWorkGroupInfo function identifies the maximum work-group size for a given kernel and device, and in the interests of memory bandwidth, it’s a good idea to make this size the local size parameter of clEnqueueNDRangeKernel.

  • The partial_sums array stores vectors instead of scalars, so it needs four times as much memory. Therefore, the host application sets the size of the allocated local memory to 4 * local_size * sizeof(float).