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