xref: /libCEED/include/ceed/jit-source/cuda/cuda-jit.h (revision 2027fb9d13fe34211738d8539f90542a9801ae2c)
1d275d636SJeremy L Thompson // Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors.
2c9c2c079SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3c9c2c079SJeremy L Thompson //
4c9c2c079SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
5c9c2c079SJeremy L Thompson //
6c9c2c079SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
7c9c2c079SJeremy L Thompson 
8c9c2c079SJeremy L Thompson /// @file
9c9c2c079SJeremy L Thompson /// Internal header for CUDA backend macro and type definitions for JiT source
10c9c2c079SJeremy L Thompson 
11c9c2c079SJeremy L Thompson #define CEED_QFUNCTION(name) inline __device__ int name
12c9c2c079SJeremy L Thompson #define CEED_QFUNCTION_HELPER inline __device__
13c9c2c079SJeremy L Thompson #define CeedPragmaSIMD
14c9c2c079SJeremy L Thompson #define CEED_Q_VLA 1
15c9c2c079SJeremy L Thompson 
16*2027fb9dSSirAlienTheGreat #define CEED_QFUNCTION_RUST(name)                                                                                       \
17*2027fb9dSSirAlienTheGreat   extern "C" __device__ int name##_rs(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out); \
18*2027fb9dSSirAlienTheGreat   static __device__ int name(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { return name##_rs(ctx, Q, in, out); }
19*2027fb9dSSirAlienTheGreat 
209e201c85SYohann #include "cuda-types.h"
21