Intel® C++ Compiler 16.0 User and Reference Guide
Configures the thread space for offloading to the processor graphics in the current thread. This topic only applies to Intel® 64 and IA-32 architectures targeting Intel® Graphics Technology.
int _GFX_set_thread_space_config(int thread_space_width, int thread_space_height, int thread_group_width, int thread_group_height);
thread_space_width, thread_space_height |
The number of thread groups along each dimension of the thread space. If both these parameters are set to zero, the compiler automatically calculates an appropriate values. These parameters must be either both zero or both be a positive integer. |
thread_group_width, thread_group_height |
The number of threads along each dimension of a thread group. If both these parameters are set to zero, the compiler automatically calculates an appropriate values. These parameters must be either both zero or both be a positive integer. |
This function configures the thread space for offloading to the processor graphics in the current thread. Other threads are not affected.
Threads that execute on the processor graphics are organized into groups called thread groups. Threads in a group are organized into a 2-dimensional array. Each thread has a 2-dimensional coordinate, which you can query using one of the following functions, which get hardware thread coordinates:
_gfx_gpgpu_group_count
_gfx_gpgpu_local_size
_gfx_gpgpu_group_id
_gfx_gpgpu_local_id
Thread groups, in turn, are also organized into a 2 dimensional array, called the thread space. This function, _GFX_set_thread_space_config enables you to shape the thread space as needed.
The environment variables GFX_THREAD_SPACE_WIDTH, GFX_THREAD_SPACE_HEIGHT, GFX_THREAD_GROUP_WIDTH and GFX_THREAD_GROUP_HEIGHT override this function.
GFX_SUCCESS |
The function succeeded. |
Error code |
The function failed. A value other than GFX_SUCCESS indicates an error, which means you provided an incorrect combination of parameters. For example, thread_space_width is set to zero and thread_space_height is non-zero, or one of the values is negative. |