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