ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
SYCLUtils.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
13 
14 #pragma once
15 
16 #include <vector>
17 
19 
20 namespace cloudViewer {
21 namespace core {
22 namespace sy {
23 
26 int SYCLDemo();
27 
32 void PrintSYCLDevices(bool print_all = false);
33 
35 bool IsAvailable();
36 
38 bool IsDeviceAvailable(const Device& device);
39 
42 std::string GetDeviceType(const Device& device);
43 
45 std::vector<Device> GetAvailableSYCLDevices();
46 
48 inline size_t GetDeviceCount() { return GetAvailableSYCLDevices().size(); }
49 
53 
54 } // namespace sy
55 } // namespace core
56 } // namespace cloudViewer
void enablePersistentJITCache()
Definition: SYCLUtils.cpp:238
bool IsAvailable()
Returns true if there is at least one SYCL device available.
Definition: SYCLUtils.cpp:200
std::string GetDeviceType(const Device &device)
Definition: SYCLUtils.cpp:216
bool IsDeviceAvailable(const Device &device)
Returns true if the specified SYCL device is available.
Definition: SYCLUtils.cpp:208
std::vector< Device > GetAvailableSYCLDevices()
Return a list of available SYCL devices.
Definition: SYCLUtils.cpp:230
void PrintSYCLDevices(bool print_all)
Definition: SYCLUtils.cpp:122
size_t GetDeviceCount()
Return the number of available SYCL devices.
Definition: SYCLUtils.h:48
Generic file read and write utility for python interface.