@@ -28,16 +28,12 @@ struct local_arg_info_t {
2828
2929struct ur_kernel_handle_t_ : RefCounted {
3030
31- ur_kernel_handle_t_ (ur_program_handle_t hProgram, const char *name,
32- nativecpu_task_t subhandler)
33- : hProgram(hProgram), _name{name}, _subhandler{std::move (subhandler)} {}
34-
3531 ur_kernel_handle_t_ (const ur_kernel_handle_t_ &other)
3632 : Args(other.Args), hProgram(other.hProgram), _name(other._name),
3733 _subhandler (other._subhandler), _localArgInfo(other._localArgInfo),
3834 _localMemPool(other._localMemPool),
3935 _localMemPoolSize(other._localMemPoolSize),
40- ReqdWGSize(other.ReqdWGSize) {
36+ ReqdWGSize(other.ReqdWGSize), NDRangeKernel(other.NDRangeKernel) {
4137 incrementReferenceCount ();
4238 }
4339
@@ -52,10 +48,11 @@ struct ur_kernel_handle_t_ : RefCounted {
5248 nativecpu_task_t subhandler,
5349 std::optional<native_cpu::WGSize_t> ReqdWGSize,
5450 std::optional<native_cpu::WGSize_t> MaxWGSize,
55- std::optional<uint64_t > MaxLinearWGSize)
51+ std::optional<uint64_t > MaxLinearWGSize,
52+ bool isNDRangeKernel)
5653 : hProgram(hProgram), _name{name}, _subhandler{std::move (subhandler)},
5754 ReqdWGSize (ReqdWGSize), MaxWGSize(MaxWGSize),
58- MaxLinearWGSize (MaxLinearWGSize) {}
55+ MaxLinearWGSize (MaxLinearWGSize), NDRangeKernel(isNDRangeKernel) {}
5956
6057 struct arguments {
6158 using args_index_t = std::vector<void *>;
@@ -162,10 +159,13 @@ struct ur_kernel_handle_t_ : RefCounted {
162159
163160 void addPtrArg (void *Ptr, size_t Index) { Args.addPtrArg (Index, Ptr); }
164161
162+ bool isNDRangeKernel () const { return NDRangeKernel; }
163+
165164private:
166165 char *_localMemPool = nullptr ;
167166 size_t _localMemPoolSize = 0 ;
168167 std::optional<native_cpu::WGSize_t> ReqdWGSize = std::nullopt ;
169168 std::optional<native_cpu::WGSize_t> MaxWGSize = std::nullopt ;
170169 std::optional<uint64_t > MaxLinearWGSize = std::nullopt ;
170+ const bool NDRangeKernel = false ;
171171};
0 commit comments