Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
23 Views

Region Addressing in openCL kernel

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 Kudos
2 Replies
Highlighted
23 Views

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

0 Kudos
Highlighted
Beginner
23 Views

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

0 Kudos