ceed-memcheck-qfunction.c (a2cba4be6838e1a18742bb6cef1b14b2cf87e1c8) ceed-memcheck-qfunction.c (990fdeb6bb8fc9af2da4472bdc0d1f57da5da0e5)
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#include <ceed/ceed.h>

--- 35 unchanged lines hidden (view full) ---

44 char name[30] = "";
45
46 ierr = CeedVectorGetArrayWrite(V[i], CEED_MEM_HOST, &impl->outputs[i]);
47 CeedChkBackend(ierr);
48
49 ierr = CeedVectorGetLength(V[i], &len); CeedChkBackend(ierr);
50 VALGRIND_MAKE_MEM_UNDEFINED(impl->outputs[i], len);
51
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#include <ceed/ceed.h>

--- 35 unchanged lines hidden (view full) ---

44 char name[30] = "";
45
46 ierr = CeedVectorGetArrayWrite(V[i], CEED_MEM_HOST, &impl->outputs[i]);
47 CeedChkBackend(ierr);
48
49 ierr = CeedVectorGetLength(V[i], &len); CeedChkBackend(ierr);
50 VALGRIND_MAKE_MEM_UNDEFINED(impl->outputs[i], len);
51
52 snprintf(name, 30, "'QFunction output %d'", i);
52 snprintf(name, 30, "'QFunction output %" CeedInt_FMT "'", i);
53 mem_block_ids[i] = VALGRIND_CREATE_BLOCK(impl->outputs[i], len, name);
54 }
55
56 ierr = f(ctxData, Q, impl->inputs, impl->outputs); CeedChkBackend(ierr);
57
58 for (CeedInt i = 0; i<num_in; i++) {
59 ierr = CeedVectorRestoreArrayRead(U[i], &impl->inputs[i]); CeedChkBackend(ierr);
60 }

--- 48 unchanged lines hidden ---
53 mem_block_ids[i] = VALGRIND_CREATE_BLOCK(impl->outputs[i], len, name);
54 }
55
56 ierr = f(ctxData, Q, impl->inputs, impl->outputs); CeedChkBackend(ierr);
57
58 for (CeedInt i = 0; i<num_in; i++) {
59 ierr = CeedVectorRestoreArrayRead(U[i], &impl->inputs[i]); CeedChkBackend(ierr);
60 }

--- 48 unchanged lines hidden ---