@@ -43,6 +43,7 @@ class interop_handler {
43
43
template <typename DataT, int Dims, access::mode AccMode,
44
44
access::target AccTarget, access::placeholder isPlaceholder>
45
45
friend class accessor ;
46
+
46
47
public:
47
48
using QueueImplPtr = std::shared_ptr<detail::queue_impl>;
48
49
using ReqToMem = std::pair<detail::Requirement*, pi_mem>;
@@ -306,8 +307,7 @@ class HostKernel : public HostKernelBase {
306
307
template <class ArgT = KernelArgType>
307
308
typename std::enable_if<std::is_same<ArgT, nd_item<Dims>>::value>::type
308
309
runOnHost (const NDRDescT &NDRDesc) {
309
- sycl::range<Dims> GroupSize (
310
- InitializedVal<Dims, range>::template get<0 >());
310
+ sycl::range<Dims> GroupSize (InitializedVal<Dims, range>::template get<0 >());
311
311
for (int I = 0 ; I < Dims; ++I) {
312
312
if (NDRDesc.LocalSize [I] == 0 ||
313
313
NDRDesc.GlobalSize [I] % NDRDesc.LocalSize [I] != 0 )
@@ -316,8 +316,7 @@ class HostKernel : public HostKernelBase {
316
316
GroupSize[I] = NDRDesc.GlobalSize [I] / NDRDesc.LocalSize [I];
317
317
}
318
318
319
- sycl::range<Dims> LocalSize (
320
- InitializedVal<Dims, range>::template get<0 >());
319
+ sycl::range<Dims> LocalSize (InitializedVal<Dims, range>::template get<0 >());
321
320
sycl::range<Dims> GlobalSize (
322
321
InitializedVal<Dims, range>::template get<0 >());
323
322
sycl::id<Dims> GlobalOffset;
@@ -358,10 +357,9 @@ class HostKernel : public HostKernelBase {
358
357
NGroups[I] = NDRDesc.GlobalSize [I] / NDRDesc.LocalSize [I];
359
358
}
360
359
361
- sycl::range<Dims> LocalSize (
362
- InitializedVal<Dims, range>::template get<0 >());
360
+ sycl::range<Dims> LocalSize (InitializedVal<Dims, range>::template get<0 >());
363
361
sycl::range<Dims> GlobalSize (
364
- InitializedVal<Dims, range>::template get<0 >());
362
+ InitializedVal<Dims, range>::template get<0 >());
365
363
for (int I = 0 ; I < Dims; ++I) {
366
364
LocalSize[I] = NDRDesc.LocalSize [I];
367
365
GlobalSize[I] = NDRDesc.GlobalSize [I];
@@ -377,10 +375,10 @@ class HostKernel : public HostKernelBase {
377
375
};
378
376
379
377
class stream_impl ;
380
- // The base class for all types of command groups.
378
+ // / Base class for all types of command groups.
381
379
class CG {
382
380
public:
383
- // Type of the command group.
381
+ // / Type of the command group.
384
382
enum CGTYPE {
385
383
NONE,
386
384
KERNEL,
@@ -424,20 +422,20 @@ class CG {
424
422
425
423
private:
426
424
CGTYPE MType;
427
- // The following storages needed to ensure that arguments won't die while
425
+ // The following storages are needed to ensure that arguments won't die while
428
426
// we are using them.
429
- // Storage for standard layout arguments.
427
+ // / Storage for standard layout arguments.
430
428
vector_class<vector_class<char >> MArgsStorage;
431
- // Storage for accessors.
429
+ // / Storage for accessors.
432
430
vector_class<detail::AccessorImplPtr> MAccStorage;
433
- // Storage for shared_ptrs.
431
+ // / Storage for shared_ptrs.
434
432
vector_class<shared_ptr_class<const void >> MSharedPtrStorage;
435
433
436
434
public:
437
- // List of requirements that specify which memory is needed for the command
438
- // group to be executed.
435
+ // / List of requirements that specify which memory is needed for the command
436
+ // / group to be executed.
439
437
vector_class<Requirement *> MRequirements;
440
- // List of events that order the execution of this CG
438
+ // / List of events that order the execution of this CG
441
439
vector_class<detail::EventImplPtr> MEvents;
442
440
// Member variables to capture the user code-location
443
441
// information from Q.submit(), Q.parallel_for() etc
@@ -447,9 +445,10 @@ class CG {
447
445
int32_t MLine, MColumn;
448
446
};
449
447
450
- // The class which represents "execute kernel" command group.
448
+ // / "Execute kernel" command group class .
451
449
class CGExecKernel : public CG {
452
450
public:
451
+ // / Stores ND-range description.
453
452
NDRDescT MNDRDesc;
454
453
unique_ptr_class<HostKernelBase> MHostKernel;
455
454
shared_ptr_class<detail::kernel_impl> MSyclKernel;
@@ -487,7 +486,7 @@ class CGExecKernel : public CG {
487
486
}
488
487
};
489
488
490
- // The class which represents "copy" command group.
489
+ // / "Copy memory" command group class .
491
490
class CGCopy : public CG {
492
491
void *MSrc;
493
492
void *MDst;
@@ -508,7 +507,7 @@ class CGCopy : public CG {
508
507
void *getDst () { return MDst; }
509
508
};
510
509
511
- // The class which represents "fill" command group.
510
+ // / "Fill memory" command group class .
512
511
class CGFill : public CG {
513
512
public:
514
513
vector_class<char > MPattern;
@@ -528,7 +527,7 @@ class CGFill : public CG {
528
527
Requirement *getReqToFill () { return MPtr; }
529
528
};
530
529
531
- // The class which represents "update host" command group.
530
+ // / "Update host" command group class .
532
531
class CGUpdateHost : public CG {
533
532
Requirement *MPtr;
534
533
@@ -547,7 +546,7 @@ class CGUpdateHost : public CG {
547
546
Requirement *getReqToUpdate () { return MPtr; }
548
547
};
549
548
550
- // The class which represents "copy" command group for USM pointers .
549
+ // / "Copy USM" command group class .
551
550
class CGCopyUSM : public CG {
552
551
void *MSrc;
553
552
void *MDst;
@@ -571,7 +570,7 @@ class CGCopyUSM : public CG {
571
570
size_t getLength () { return MLength; }
572
571
};
573
572
574
- // The class which represents "fill" command group for USM pointers .
573
+ // / "Fill USM" command group class .
575
574
class CGFillUSM : public CG {
576
575
vector_class<char > MPattern;
577
576
void *MDst;
@@ -594,7 +593,7 @@ class CGFillUSM : public CG {
594
593
int getFill () { return MPattern[0 ]; }
595
594
};
596
595
597
- // The class which represents "prefetch" command group for USM pointers .
596
+ // / "Prefetch USM" command group class .
598
597
class CGPrefetchUSM : public CG {
599
598
void *MDst;
600
599
size_t MLength;
0 commit comments