Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shambackends
include
shambackends
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
18
#include "
shambackends/Device.hpp
"
19
20
namespace
sham
{
21
28
class
DeviceContext
{
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
Device.hpp
sham::DeviceContext
A class that represents a SYCL context.
Definition
DeviceContext.hpp:28
sham::DeviceContext::print_info
void print_info()
Print information about this context.
Definition
DeviceContext.cpp:44
sham::DeviceContext::device
std::shared_ptr< Device > device
Definition
DeviceContext.hpp:33
sham::DeviceContext::use_direct_comm
bool use_direct_comm()
Check if the context should use direct communication.
Definition
DeviceContext.cpp:57
sham::DeviceContext::ctx
sycl::context ctx
Definition
DeviceContext.hpp:38
sham
namespace for backends this one is named only sham since shambackends is too long to write
Definition
fma_chains.hpp:24
Generated on Wed May 13 2026 13:21:48 for Shamrock by
1.9.8