-
Notifications
You must be signed in to change notification settings - Fork 555
Expand file tree
/
Copy pathModule.hpp
More file actions
44 lines (34 loc) · 1.18 KB
/
Copy pathModule.hpp
File metadata and controls
44 lines (34 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*******************************************************
* Copyright (c) 2022, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#pragma once
#include <common/ModuleInterface.hpp>
#include <sycl/sycl.hpp>
namespace arrayfire {
namespace oneapi {
/// oneapi backend wrapper for cl::Program object
class Module
: public common::ModuleInterface<
sycl::kernel_bundle<sycl::bundle_state::executable> *> {
public:
using ModuleType = sycl::kernel_bundle<sycl::bundle_state::executable> *;
using BaseClass = common::ModuleInterface<ModuleType>;
/// \brief Create an uninitialized Module
Module() = default;
/// \brief Create a module given a sycl::program type
Module(ModuleType mod) : BaseClass(mod) {}
/// \brief Unload module
operator bool() const final { return get()->empty(); }
/// Unload the module
void unload() final {
// TODO(oneapi): Unload kernel/program
;
}
};
} // namespace oneapi
} // namespace arrayfire