Skip to content

Commit

Permalink
gpu: ocl: add dim_t type for offset calculations
Browse files Browse the repository at this point in the history
The new `dim_t` type can be used for offset calculations. Some control of this
type is enabled via `kernel_ctx::require_32_bit_offset()` for use on small
problems on hardware without native 64 bit arithmetic.
  • Loading branch information
rjoursler authored and vpirogov committed May 12, 2023
1 parent 7c23d9e commit d058bd8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gpu/ocl/ocl_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#endif

#define dim_t long // 64 bit per the OpenCL specification

#if DT_F32 == 1
#define DATA_T float
#define DATA2_T float2
Expand Down

0 comments on commit d058bd8

Please # to comment.