c - OpenCL 2 dimensional work item order? -


i have massive 2 dimensional array doing calculations on (4.3bil(32bit unsigned int) in x 512 rows in y) i'm trying speed opencl.

i cannot @ once, i'm trying 2 dimensional work group setup.

each "column", 4.3billion of them, has next row generated math , bit rotating of previous row. can generate values on fly.

but since row above current working row must set value already, need ensure when work groups fire off, group "above" has been completed. groups next each other don't matter - columns don't interact other columns.

how work groups fired off? across x, reset x 0 , increment y one? random jumping about? there rhyme or reason it?

and can work groups told hold off until group 'above' has finished?

i know next to, above, below, rows, columns meaningless in 2 dimensional array programming sense, helps me @ least visualize problem.

i can make work if can ensure groups don't jump ahead. not sure how.

i know there fences sure other work items have caught up

there no way synchronise between work-groups within kernel invocation in opencl. if need global memory synchronisation across multiple work-groups, need enqueue multiple kernels.

if each column independent piece of work, sounds simpler launch 1 work-item per column, , have every row column. following:

kernel void foo(...) {   int column = get_global_id(0);   (int row = 0; row < 512; row++)   {     // processing (column,row), based on (column,row-1),     // processed work-item   } } 

this launched 1d kernel, global size equal number of columns.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -