1 /// @file 2 /// Test CeedVectorDestroy state counter 3 /// \test Test CeedVectorDestroy state counter 4 5 //TESTARGS(only="cpu") {ceed_resource} 6 #include <ceed.h> 7 main(int argc,char ** argv)8int main(int argc, char **argv) { 9 Ceed ceed; 10 CeedVector x; 11 CeedInt len = 10; 12 CeedScalar *a; 13 14 CeedInit(argv[1], &ceed); 15 16 CeedVectorCreate(ceed, len, &x); 17 CeedVectorSetValue(x, 0.0); 18 CeedVectorGetArray(x, CEED_MEM_HOST, &a); 19 20 // Write access not restored should generate an error 21 CeedVectorDestroy(&x); 22 23 // LCOV_EXCL_START 24 CeedDestroy(&ceed); 25 return 0; 26 // LCOV_EXCL_STOP 27 } 28