TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
hd.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2#pragma once
3// TM_HD marks functions that must compile identically for host and device.
4// Code shared by a CPU reference path and a CUDA kernel uses it, so both paths run the same arithmetic.
5#if defined(__CUDACC__)
6#define TM_HD __host__ __device__
7#define TM_HD_INLINE __host__ __device__ __forceinline__
8#else
9#define TM_HD
10#define TM_HD_INLINE inline
11#endif