1*5aed82e4SJeremy L Thompson // Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and other CEED contributors. 2bd882c8aSJames Wright // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3bd882c8aSJames Wright // 4bd882c8aSJames Wright // SPDX-License-Identifier: BSD-2-Clause 5bd882c8aSJames Wright // 6bd882c8aSJames Wright // This file is part of CEED: http://github.com/ceed 7bd882c8aSJames Wright 849ed4312SSebastian Grimberg /// @file 949ed4312SSebastian Grimberg /// Internal header for SYCL backend QFunction read/write kernels 1094b7b29bSJeremy L Thompson #ifndef CEED_SYCL_REF_QFUNCTION_H 1194b7b29bSJeremy L Thompson #define CEED_SYCL_REF_QFUNCTION_H 1249ed4312SSebastian Grimberg 13bd882c8aSJames Wright #include <ceed.h> 14bd882c8aSJames Wright 15bd882c8aSJames Wright //------------------------------------------------------------------------------ 16bd882c8aSJames Wright // Read from quadrature points 17bd882c8aSJames Wright //------------------------------------------------------------------------------ 18bd882c8aSJames Wright inline void readQuads(CeedInt N, CeedInt stride, CeedInt offset, const CeedScalar *src, CeedScalar *dest) { 19bd882c8aSJames Wright for (CeedInt i = 0; i < N; ++i) dest[i] = src[stride * i + offset]; 20bd882c8aSJames Wright } 21bd882c8aSJames Wright 22bd882c8aSJames Wright //------------------------------------------------------------------------------ 23bd882c8aSJames Wright // Write at quadrature points 24bd882c8aSJames Wright //------------------------------------------------------------------------------ 25bd882c8aSJames Wright inline void writeQuads(CeedInt N, CeedInt stride, CeedInt offset, const CeedScalar *src, CeedScalar *dest) { 26bd882c8aSJames Wright for (CeedInt i = 0; i < N; ++i) dest[stride * i + offset] = src[i]; 27bd882c8aSJames Wright } 28ff1e7120SSebastian Grimberg 29bd882c8aSJames Wright //------------------------------------------------------------------------------ 3049ed4312SSebastian Grimberg 3194b7b29bSJeremy L Thompson #endif // CEED_SYCL_REF_QFUNCTION_H 32