1 // Copyright (c) 2017-2024, 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 #include <ceed/types.h> 11 12 //------------------------------------------------------------------------------ 13 // Read from quadrature points 14 //------------------------------------------------------------------------------ 15 inline void readQuads(CeedInt N, CeedInt stride, CeedInt offset, const CeedScalar *src, CeedScalar *dest) { 16 for (CeedInt i = 0; i < N; ++i) dest[i] = src[stride * i + offset]; 17 } 18 19 //------------------------------------------------------------------------------ 20 // Write at quadrature points 21 //------------------------------------------------------------------------------ 22 inline void writeQuads(CeedInt N, CeedInt stride, CeedInt offset, const CeedScalar *src, CeedScalar *dest) { 23 for (CeedInt i = 0; i < N; ++i) dest[stride * i + offset] = src[i]; 24 } 25