numba_dpex.ocl.stubs module
- class numba_dpex.ocl.stubs.Stub
Bases:
objectA stub object to represent special objects that are meaningless outside the context of kernel compilation.
- class numba_dpex.ocl.stubs.atomic
Bases:
Stub- add(ary, idx, val)
Performs atomic addition ary[idx] += val.
- Parameters:
- ary: An array on which the atomic operation is performed.
Allowed types: int32, int64, float32, or float64
idx (int): Index of the array element, on which atomic operation is performed
- val: The value of an increment.
Its type must match the type of array elements, ary[]
- Returns:
The old value at the index location ary[idx] as if it is loaded atomically.
- Raises:
None
- sub(ary, idx, val)
Performs atomic subtraction ary[idx] -= val.
- Parameters:
- ary: An array on which the atomic operation is performed.
Allowed types: int32, int64, float32, or float64
idx (int): Index of the array element, on which atomic operation is performed
- val: The value of a decrement.
Its type must match the type of array elements, ary[]
- Returns:
The old value at the index location ary[idx] as if it is loaded atomically.
- Raises:
None
- numba_dpex.ocl.stubs.barrier(*args, **kargs)
OpenCL barrier()
- numba_dpex.ocl.stubs.get_global_id(*args, **kargs)
OpenCL get_global_id()
- numba_dpex.ocl.stubs.get_global_size(*args, **kargs)
OpenCL get_global_size()
- numba_dpex.ocl.stubs.get_group_id(*args, **kargs)
OpenCL get_group_id()
- numba_dpex.ocl.stubs.get_local_id(*args, **kargs)
OpenCL get_local_id()
- numba_dpex.ocl.stubs.get_local_size(*args, **kargs)
OpenCL get_local_size()
- numba_dpex.ocl.stubs.get_num_groups(*args, **kargs)
OpenCL get_num_groups()
- numba_dpex.ocl.stubs.get_work_dim(*args, **kargs)
OpenCL get_work_dim()
- class numba_dpex.ocl.stubs.local
Bases:
Stublocal namespace
- array(shape, dtype)
Allocate a local array.
- numba_dpex.ocl.stubs.mem_fence(*args, **kargs)
OpenCL mem_fence()
- class numba_dpex.ocl.stubs.private
Bases:
Stubprivate namespace
- array(shape, dtype)
Allocate a private array.
- numba_dpex.ocl.stubs.sub_group_barrier()
OpenCL 2.0 sub_group_barrier