Skip to content

【Some Confusion about nd_range's API】 #1989

Closed
@ddummkopfer

Description

@ddummkopfer

I find some examples about the SYCL‘s class nd_range.
I am confused about some APIs like 'get_global_range' , 'get_local_range', 'get_group_range' and 'get_offset'.
How to understand the global range, local range and group range?
Does the global range mean the range of the work group?
Does the local range mean the range of the work item?
What does the group range mean?

`cl::sycl::nd_range<3> three_dim_nd_range({32, 64, 128}, {16, 32, 64} );

assert(three_dim_nd_range.get_global_range() == cl::sycl::range<3>(32, 64, 128));

assert(three_dim_nd_range.get_local_range() == cl::sycl::range<3>(16, 32, 64));

assert(three_dim_nd_range.get_group_range() == cl::sycl::range<3>(2, 2, 2));

assert(three_dim_nd_range.get_offset() == cl::sycl::id<3>(0, 0, 0));
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions