oneapi backend wrapper for cl::Program object
| 18 | |
| 19 | /// oneapi backend wrapper for cl::Program object |
| 20 | class Module |
| 21 | : public common::ModuleInterface< |
| 22 | sycl::kernel_bundle<sycl::bundle_state::executable> *> { |
| 23 | public: |
| 24 | using ModuleType = sycl::kernel_bundle<sycl::bundle_state::executable> *; |
| 25 | using BaseClass = common::ModuleInterface<ModuleType>; |
| 26 | |
| 27 | /// \brief Create an uninitialized Module |
| 28 | Module() = default; |
| 29 | |
| 30 | /// \brief Create a module given a sycl::program type |
| 31 | Module(ModuleType mod) : BaseClass(mod) {} |
| 32 | |
| 33 | /// \brief Unload module |
| 34 | operator bool() const final { return get()->empty(); } |
| 35 | |
| 36 | /// Unload the module |
| 37 | void unload() final { |
| 38 | // TODO(oneapi): Unload kernel/program |
| 39 | ; |
| 40 | } |
| 41 | }; |
| 42 | |
| 43 | } // namespace oneapi |
| 44 | } // namespace arrayfire |