Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
DeviceContext.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
19
20namespace sham {
21
29 public:
33 std::shared_ptr<Device> device;
34
38 sycl::context ctx;
39
43 void print_info();
44
50 explicit DeviceContext(std::shared_ptr<Device> device);
51
60 bool use_direct_comm();
61 };
62
63} // namespace sham
A class that represents a SYCL context.
void print_info()
Print information about this context.
std::shared_ptr< Device > device
bool use_direct_comm()
Check if the context should use direct communication.
namespace for backends this one is named only sham since shambackends is too long to write