xref: /libCEED/rust/libceed-sys/c-src/backends/memcheck/ceed-memcheck.h (revision 2b730f8b5a9c809740a0b3b302db43a719c636b1)
13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3fc7cf9a0Sjeremylt //
43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
5fc7cf9a0Sjeremylt //
63d8e8822SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
7fc7cf9a0Sjeremylt 
83d576824SJeremy L Thompson #ifndef _ceed_memcheck_h
93d576824SJeremy L Thompson #define _ceed_memcheck_h
103d576824SJeremy L Thompson 
11ec3da8bcSJed Brown #include <ceed/backend.h>
12*2b730f8bSJeremy L Thompson #include <ceed/ceed.h>
13fc7cf9a0Sjeremylt 
14fc7cf9a0Sjeremylt typedef struct {
15fc7cf9a0Sjeremylt   const CeedScalar **inputs;
16fc7cf9a0Sjeremylt   CeedScalar       **outputs;
17d1d35e2fSjeremylt   bool               setup_done;
18fc7cf9a0Sjeremylt } CeedQFunction_Memcheck;
19fc7cf9a0Sjeremylt 
200f58c348SJeremy L Thompson typedef struct {
210f58c348SJeremy L Thompson   int   mem_block_id;
220f58c348SJeremy L Thompson   void *data;
230f58c348SJeremy L Thompson   void *data_allocated;
240f58c348SJeremy L Thompson   void *data_owned;
258e457467SJeremy L Thompson   void *data_borrowed;
268e457467SJeremy L Thompson   void *data_read_only_copy;
270f58c348SJeremy L Thompson } CeedQFunctionContext_Memcheck;
280f58c348SJeremy L Thompson 
29fc7cf9a0Sjeremylt CEED_INTERN int CeedQFunctionCreate_Memcheck(CeedQFunction qf);
303d576824SJeremy L Thompson 
310f58c348SJeremy L Thompson CEED_INTERN int CeedQFunctionContextCreate_Memcheck(CeedQFunctionContext ctx);
320f58c348SJeremy L Thompson 
333d576824SJeremy L Thompson #endif  // _ceed_memcheck_h
34