Hi,
I cannot find the way to store/write integer value back to the attribute. For vectors we use vstore3 (ie, vstore3(value, idx, P)), what should I use for integers?
Thanks!
Store integer in OpenCL node
1268 2 1- perpen
- Member
- 59 posts
- Joined: April 2006
- Offline
- Ivan L
- Member
- 172 posts
- Joined: Jan. 2014
- Offline
Hi,
As it's just a huge array of integers you can have access to the element of the array using this syntax.
Where idx is the current work item.
Make sure you have your parameters for readable/writeable turned on.
vstore3 is no more than
DIM could be any number depends on your dimension size, for vectors it's 3
As it's just a huge array of integers you can have access to the element of the array using this syntax.
Where idx is the current work item.
Make sure you have your parameters for readable/writeable turned on.
yourattrib[idx] = value;
vstore3 is no more than
DIM could be any number depends on your dimension size, for vectors it's 3
{ int block = idx*DIM; dataout[block] = datain.x; dataout[block+1] = datain.y; dataout[block+2] = datain.z; }
Edited by Ivan L - Dec. 24, 2019 20:34:00
I contribute to the beauty of this world
- perpen
- Member
- 59 posts
- Joined: April 2006
- Offline
-
- Quick Links