Lines Matching refs:sub

5 static PetscErrorCode DoFork(PetscDeviceContext parent, PetscInt n, PetscDeviceContext **sub)  in DoFork()  argument
13 PetscCall(PetscDeviceContextFork(parent, n, sub)); in DoFork()
14 …if (n) PetscCheck(*sub, PETSC_COMM_SELF, PETSC_ERR_PLIB, "PetscDeviceContextFork() return NULL poi… in DoFork()
19 PetscCall(AssertDeviceContextExists((*sub)[i])); in DoFork()
20 PetscCall(PetscDeviceContextGetStreamType((*sub)[i], &sub_stype)); in DoFork()
22 PetscCall(PetscDeviceContextGetDeviceType((*sub)[i], &sub_dtype)); in DoFork()
28 …cErrorCode TestNestedPetscDeviceContextForkJoin(PetscDeviceContext parCtx, PetscDeviceContext *sub) in TestNestedPetscDeviceContextForkJoin() argument
34 PetscAssertPointer(sub, 2); in TestNestedPetscDeviceContextForkJoin()
35 …PetscCall(AssertPetscDeviceContextsValidAndEqual(parCtx, sub[0], "Current global context does not … in TestNestedPetscDeviceContextForkJoin()
37 PetscCall(DoFork(sub[1], nsub, &subsub)); in TestNestedPetscDeviceContextForkJoin()
39 PetscCall(PetscDeviceContextJoin(sub[2], nsub - 2, PETSC_DEVICE_CONTEXT_JOIN_SYNC, &subsub)); in TestNestedPetscDeviceContextForkJoin()
42 PetscCall(PetscDeviceContextJoin(sub[1], nsub, PETSC_DEVICE_CONTEXT_JOIN_DESTROY, &subsub)); in TestNestedPetscDeviceContextForkJoin()
49 PetscDeviceContext *sub; in TestPetscDeviceContextForkJoin() local
54 PetscCall(DoFork(dctx, n, &sub)); in TestPetscDeviceContextForkJoin()
55 PetscCall(PetscDeviceContextJoin(dctx, n, PETSC_DEVICE_CONTEXT_JOIN_DESTROY, &sub)); in TestPetscDeviceContextForkJoin()
57 PetscCall(DoFork(dctx, n, &sub)); in TestPetscDeviceContextForkJoin()
58 PetscCall(PetscDeviceContextJoin(dctx, n, PETSC_DEVICE_CONTEXT_JOIN_DESTROY, &sub)); in TestPetscDeviceContextForkJoin()
61 PetscCall(DoFork(dctx, n + 1, &sub)); in TestPetscDeviceContextForkJoin()
63 PetscCall(TestNestedPetscDeviceContextForkJoin(sub[0], sub)); in TestPetscDeviceContextForkJoin()
65 PetscCall(PetscDeviceContextJoin(dctx, n - 1, PETSC_DEVICE_CONTEXT_JOIN_NO_SYNC, &sub)); in TestPetscDeviceContextForkJoin()
67 PetscCall(PetscDeviceContextJoin(dctx, n + 1, PETSC_DEVICE_CONTEXT_JOIN_DESTROY, &sub)); in TestPetscDeviceContextForkJoin()