@@ -149,26 +149,26 @@ class CG {
149149 };
150150
151151 // / Type of the command group.
152- enum CGTYPE : unsigned int {
153- NONE = 0 ,
154- KERNEL = 1 ,
155- COPY_ACC_TO_PTR = 2 ,
156- COPY_PTR_TO_ACC = 3 ,
157- COPY_ACC_TO_ACC = 4 ,
158- BARRIER = 5 ,
159- BARRIER_WAITLIST = 6 ,
160- FILL = 7 ,
161- UPDATE_HOST = 8 ,
162- RUN_ON_HOST_INTEL = 9 ,
163- COPY_USM = 10 ,
164- FILL_USM = 11 ,
165- PREFETCH_USM = 12 ,
166- CODEPLAY_INTEROP_TASK = 13 ,
167- CODEPLAY_HOST_TASK = 14 ,
168- ADVISE_USM = 15 ,
152+ enum CGType : unsigned int {
153+ None = 0 ,
154+ Kernel = 1 ,
155+ CopyAccToPtr = 2 ,
156+ CopyPtrToAcc = 3 ,
157+ CopyAccToAcc = 4 ,
158+ Barrier = 5 ,
159+ BarrierWaitlist = 6 ,
160+ Fill = 7 ,
161+ UpdateHost = 8 ,
162+ RunOnHostIntel = 9 ,
163+ CopyUSM = 10 ,
164+ FillUSM = 11 ,
165+ PrefetchUSM = 12 ,
166+ CodeplayInteropTask = 13 ,
167+ CodeplayHostTask = 14 ,
168+ AdviseUSM = 15 ,
169169 };
170170
171- CG (CGTYPE Type, std::vector<std::vector<char >> ArgsStorage,
171+ CG (CGType Type, std::vector<std::vector<char >> ArgsStorage,
172172 std::vector<detail::AccessorImplPtr> AccStorage,
173173 std::vector<std::shared_ptr<const void >> SharedPtrStorage,
174174 std::vector<Requirement *> Requirements,
@@ -190,7 +190,7 @@ class CG {
190190
191191 CG (CG &&CommandGroup) = default;
192192
193- CGTYPE getType () { return static_cast <CGTYPE >(getUnversionedCGType (MType)); }
193+ CGType getType () { return static_cast <CGType >(getUnversionedCGType (MType)); }
194194
195195 CG_VERSION getVersion () {
196196 return static_cast <CG_VERSION>(getCGTypeVersion (MType));
@@ -209,7 +209,7 @@ class CG {
209209 virtual ~CG () = default ;
210210
211211private:
212- CGTYPE MType;
212+ CGType MType;
213213 // The following storages are needed to ensure that arguments won't die while
214214 // we are using them.
215215 // / Storage for standard layout arguments.
@@ -255,16 +255,17 @@ class CGExecKernel : public CG {
255255 std::vector<ArgDesc> Args, std::string KernelName,
256256 detail::OSModuleHandle OSModuleHandle,
257257 std::vector<std::shared_ptr<detail::stream_impl>> Streams,
258- CGTYPE Type, detail::code_location loc = {})
258+ CGType Type, detail::code_location loc = {})
259259 : CG(Type, std::move(ArgsStorage), std::move(AccStorage),
260260 std::move (SharedPtrStorage), std::move(Requirements),
261261 std::move(Events), std::move(loc)),
262262 MNDRDesc(std::move(NDRDesc)), MHostKernel(std::move(HKernel)),
263263 MSyclKernel(std::move(SyclKernel)), MArgs(std::move(Args)),
264264 MKernelName(std::move(KernelName)), MOSModuleHandle(OSModuleHandle),
265265 MStreams(std::move(Streams)) {
266- assert ((getType () == RUN_ON_HOST_INTEL || getType () == KERNEL) &&
267- " Wrong type of exec kernel CG." );
266+ assert (
267+ (getType () == CGType::RunOnHostIntel || getType () == CGType::Kernel) &&
268+ " Wrong type of exec kernel CG." );
268269 }
269270
270271 std::vector<ArgDesc> getArguments () const { return MArgs; }
@@ -294,7 +295,7 @@ class CGCopy : public CG {
294295 void *MDst;
295296
296297public:
297- CGCopy (CGTYPE CopyType, void *Src, void *Dst,
298+ CGCopy (CGType CopyType, void *Src, void *Dst,
298299 std::vector<std::vector<char >> ArgsStorage,
299300 std::vector<detail::AccessorImplPtr> AccStorage,
300301 std::vector<std::shared_ptr<const void >> SharedPtrStorage,
@@ -322,7 +323,7 @@ class CGFill : public CG {
322323 std::vector<Requirement *> Requirements,
323324 std::vector<detail::EventImplPtr> Events,
324325 detail::code_location loc = {})
325- : CG(FILL , std::move(ArgsStorage), std::move(AccStorage),
326+ : CG(CGType::Fill , std::move(ArgsStorage), std::move(AccStorage),
326327 std::move (SharedPtrStorage), std::move(Requirements),
327328 std::move(Events), std::move(loc)),
328329 MPattern(std::move(Pattern)), MPtr((Requirement *)Ptr) {}
@@ -340,7 +341,7 @@ class CGUpdateHost : public CG {
340341 std::vector<Requirement *> Requirements,
341342 std::vector<detail::EventImplPtr> Events,
342343 detail::code_location loc = {})
343- : CG(UPDATE_HOST , std::move(ArgsStorage), std::move(AccStorage),
344+ : CG(CGType::UpdateHost , std::move(ArgsStorage), std::move(AccStorage),
344345 std::move (SharedPtrStorage), std::move(Requirements),
345346 std::move(Events), std::move(loc)),
346347 MPtr((Requirement *)Ptr) {}
@@ -362,7 +363,7 @@ class CGCopyUSM : public CG {
362363 std::vector<Requirement *> Requirements,
363364 std::vector<detail::EventImplPtr> Events,
364365 detail::code_location loc = {})
365- : CG(COPY_USM , std::move(ArgsStorage), std::move(AccStorage),
366+ : CG(CGType::CopyUSM , std::move(ArgsStorage), std::move(AccStorage),
366367 std::move (SharedPtrStorage), std::move(Requirements),
367368 std::move(Events), std::move(loc)),
368369 MSrc(Src), MDst(Dst), MLength(Length) {}
@@ -386,7 +387,7 @@ class CGFillUSM : public CG {
386387 std::vector<Requirement *> Requirements,
387388 std::vector<detail::EventImplPtr> Events,
388389 detail::code_location loc = {})
389- : CG(FILL_USM , std::move(ArgsStorage), std::move(AccStorage),
390+ : CG(CGType::FillUSM , std::move(ArgsStorage), std::move(AccStorage),
390391 std::move (SharedPtrStorage), std::move(Requirements),
391392 std::move(Events), std::move(loc)),
392393 MPattern(std::move(Pattern)), MDst(DstPtr), MLength(Length) {}
@@ -408,7 +409,7 @@ class CGPrefetchUSM : public CG {
408409 std::vector<Requirement *> Requirements,
409410 std::vector<detail::EventImplPtr> Events,
410411 detail::code_location loc = {})
411- : CG(PREFETCH_USM , std::move(ArgsStorage), std::move(AccStorage),
412+ : CG(CGType::PrefetchUSM , std::move(ArgsStorage), std::move(AccStorage),
412413 std::move (SharedPtrStorage), std::move(Requirements),
413414 std::move(Events), std::move(loc)),
414415 MDst(DstPtr), MLength(Length) {}
@@ -427,7 +428,7 @@ class CGAdviseUSM : public CG {
427428 std::vector<detail::AccessorImplPtr> AccStorage,
428429 std::vector<std::shared_ptr<const void >> SharedPtrStorage,
429430 std::vector<Requirement *> Requirements,
430- std::vector<detail::EventImplPtr> Events, CGTYPE Type,
431+ std::vector<detail::EventImplPtr> Events, CGType Type,
431432 detail::code_location loc = {})
432433 : CG(Type, std::move(ArgsStorage), std::move(AccStorage),
433434 std::move (SharedPtrStorage), std::move(Requirements),
@@ -456,7 +457,7 @@ class CGInteropTask : public CG {
456457 std::vector<detail::AccessorImplPtr> AccStorage,
457458 std::vector<std::shared_ptr<const void >> SharedPtrStorage,
458459 std::vector<Requirement *> Requirements,
459- std::vector<detail::EventImplPtr> Events, CGTYPE Type,
460+ std::vector<detail::EventImplPtr> Events, CGType Type,
460461 detail::code_location loc = {})
461462 : CG(Type, std::move(ArgsStorage), std::move(AccStorage),
462463 std::move (SharedPtrStorage), std::move(Requirements),
@@ -481,7 +482,7 @@ class CGHostTask : public CG {
481482 std::vector<detail::AccessorImplPtr> AccStorage,
482483 std::vector<std::shared_ptr<const void >> SharedPtrStorage,
483484 std::vector<Requirement *> Requirements,
484- std::vector<detail::EventImplPtr> Events, CGTYPE Type,
485+ std::vector<detail::EventImplPtr> Events, CGType Type,
485486 detail::code_location loc = {})
486487 : CG(Type, std::move(ArgsStorage), std::move(AccStorage),
487488 std::move (SharedPtrStorage), std::move(Requirements),
@@ -499,7 +500,7 @@ class CGBarrier : public CG {
499500 std::vector<detail::AccessorImplPtr> AccStorage,
500501 std::vector<std::shared_ptr<const void >> SharedPtrStorage,
501502 std::vector<Requirement *> Requirements,
502- std::vector<detail::EventImplPtr> Events, CGTYPE Type,
503+ std::vector<detail::EventImplPtr> Events, CGType Type,
503504 detail::code_location loc = {})
504505 : CG(Type, std::move(ArgsStorage), std::move(AccStorage),
505506 std::move (SharedPtrStorage), std::move(Requirements),
0 commit comments