Blender V5.3
device/oneapi/queue.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021-2025 Intel Corporation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7#ifdef WITH_ONEAPI
8
9# include "device/memory.h"
10# include "device/queue.h"
11
13
14# include "util/unique_ptr.h"
15
17
18class OneapiDevice;
19class device_memory;
20
21/* Base class for OneAPI queues. */
22class OneapiDeviceQueue : public DeviceQueue {
23 public:
24 explicit OneapiDeviceQueue(OneapiDevice *device);
25
26 int num_sort_partitions(int max_num_paths, uint max_scene_shaders) const override;
27
28 void init_execution() override;
29 void load_image_info() override;
30
31 bool enqueue(DeviceKernel kernel,
32 const int kernel_work_size,
33 const DeviceKernelArguments &args) override;
34
35 bool synchronize() override;
36
37 void zero_to_device(device_memory &mem) override;
38 void copy_to_device(device_memory &mem) override;
39 void copy_from_device(device_memory &mem) override;
40 void *copy_from_device_synchronized(device_memory &mem, vector<uint8_t> &storage) override;
41
42 bool supports_local_atomic_sort() const override
43 {
44 return true;
45 }
46
47# ifdef SYCL_LINEAR_MEMORY_INTEROP_AVAILABLE
48 unique_ptr<DeviceGraphicsInterop> graphics_interop_create() override;
49# endif
50
51 protected:
52 OneapiDevice *oneapi_device_;
53 unique_ptr<KernelContext> kernel_context_;
54
55 ConcurrentStatesParams concurrent_states_params() const override;
56 void get_memory_info(size_t &total, size_t &free) const override;
57};
58
60
61#endif /* WITH_ONEAPI */
#define CCL_NAMESPACE_END
#define storage(slot, qualifiers)
DeviceKernel