@@ -326,7 +326,9 @@ class CG {
326326 COPY_ACC_TO_ACC,
327327 FILL,
328328 UPDATE_HOST,
329- RUN_ON_HOST_INTEL
329+ RUN_ON_HOST_INTEL,
330+ COPY_USM,
331+ FILL_USM
330332 };
331333
332334 CG (CGTYPE Type, std::vector<std::vector<char >> ArgsStorage,
@@ -461,6 +463,51 @@ class CGUpdateHost : public CG {
461463 Requirement *getReqToUpdate () { return MPtr; }
462464};
463465
466+ // The class which represents "copy" command group for USM pointers.
467+ class CGCopyUSM : public CG {
468+ void *MSrc;
469+ void *MDst;
470+ size_t MLength;
471+
472+ public:
473+ CGCopyUSM (void *Src, void *Dst, size_t Length,
474+ std::vector<std::vector<char >> ArgsStorage,
475+ std::vector<detail::AccessorImplPtr> AccStorage,
476+ std::vector<std::shared_ptr<const void >> SharedPtrStorage,
477+ std::vector<Requirement *> Requirements,
478+ std::vector<detail::EventImplPtr> Events)
479+ : CG(COPY_USM, std::move(ArgsStorage), std::move(AccStorage),
480+ std::move (SharedPtrStorage), std::move(Requirements),
481+ std::move(Events)),
482+ MSrc(Src), MDst(Dst), MLength(Length) {}
483+
484+ void *getSrc () { return MSrc; }
485+ void *getDst () { return MDst; }
486+ size_t getLength () { return MLength; }
487+ };
488+
489+ // The class which represents "fill" command group for USM pointers.
490+ class CGFillUSM : public CG {
491+ std::vector<char > MPattern;
492+ void *MDst;
493+ size_t MLength;
494+
495+ public:
496+ CGFillUSM (std::vector<char > Pattern, void *DstPtr, size_t Length,
497+ std::vector<std::vector<char >> ArgsStorage,
498+ std::vector<detail::AccessorImplPtr> AccStorage,
499+ std::vector<std::shared_ptr<const void >> SharedPtrStorage,
500+ std::vector<Requirement *> Requirements,
501+ std::vector<detail::EventImplPtr> Events)
502+ : CG(FILL_USM, std::move(ArgsStorage), std::move(AccStorage),
503+ std::move (SharedPtrStorage), std::move(Requirements),
504+ std::move(Events)),
505+ MPattern(std::move(Pattern)), MDst(DstPtr), MLength(Length) {}
506+ void *getDst () { return MDst; }
507+ size_t getLength () { return MLength; }
508+ int getFill () { return MPattern[0 ]; }
509+ };
510+
464511} // namespace detail
465512} // namespace sycl
466513} // namespace cl
0 commit comments