OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Объявления
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

Region Addressing in openCL kernel

Stephan1
Начинающий
750Просмотр.

Hi

The Intel OpenSource HD Graphics Programmer's Reference Manual Vol 4 Part 2 for HD 4000 describes the region adressing feature.

Is it possible to utilize register indrect region addressing in an openCL kernel on HD4000 ?

Best regards, Stephan

0 баллов
2 Ответы
Raghupathi_M_Intel
Сотрудник
750Просмотр.

Hi Stephan,

This is something that the compiler takes advantage of and the OCL kernel developer does not have control over. Hope that helps.

Raghu

Stephan1
Начинающий
750Просмотр.

Hi Raghu

Thank ypu a lot for the answer. Can we just wrap it up ?

I think twiddling uses direct region adressing, i.e. the element access in the region is coded.
Im am right ? E.g.:
float4 a, b;
a.s0123 = b.s3210;

(One could dissassemble the .ir to check the GPU asm, but I guess, this needs a certain VTune version ?)

Which opencl C code statement would lead to an indirect region adressing by the compiler ?
Some array access ? Here my untested idea:
float4 dst;
float4 src[ 16 ];
int4 idx = ... ; // values within range 0..15
dst = src[ idx ];

Yes, it could be done also with several fetches. Would the compiler combine those into one inderect region adressing ?
dst.s0 = src[ idx.s0 ];
dst.s1 = src[ idx.s1 ];

Best regards, Stephan

Ответить