Lines Matching refs:sub
105 PetscDeviceContext *sub; in TestAsyncCoherence() local
110 PetscCall(PetscDeviceContextForkWithStreamType(dctx, PETSC_STREAM_NONBLOCKING, nsub, &sub)); in TestAsyncCoherence()
113 PetscCall(PetscDeviceMalloc(sub[i], PETSC_MEMTYPE_HOST, n, &ptr)); in TestAsyncCoherence()
114 PetscCall(PetscDeviceFree(sub[i], ptr)); in TestAsyncCoherence()
116 PetscCall(PetscDeviceMalloc(sub[i], PETSC_MEMTYPE_DEVICE, n, &ptr)); in TestAsyncCoherence()
117 PetscCall(PetscDeviceFree(sub[i], ptr)); in TestAsyncCoherence()
122 PetscCall(PetscDeviceMalloc(sub[0], PETSC_MEMTYPE_HOST, n, &ptr)); in TestAsyncCoherence()
124 PetscCall(PetscDeviceFree(sub[1], ptr)); in TestAsyncCoherence()
127 PetscCall(PetscDeviceMalloc(sub[0], PETSC_MEMTYPE_HOST, n, &ptr)); in TestAsyncCoherence()
129 PetscCall(PetscDeviceArrayZero(sub[1], ptr, n)); in TestAsyncCoherence()
130 PetscCall(PetscDeviceContextSynchronize(sub[1])); in TestAsyncCoherence()
134 PetscCall(PetscDeviceFree(sub[1], ptr)); in TestAsyncCoherence()
140 PetscCall(PetscDeviceArrayCopy(sub[0], tmp_ptr, ptr, n)); in TestAsyncCoherence()
141 PetscCall(PetscDeviceContextSynchronize(sub[0])); in TestAsyncCoherence()
145 PetscCall(PetscDeviceFree(sub[1], ptr)); in TestAsyncCoherence()
148 PetscCall(PetscDeviceContextJoin(dctx, nsub, PETSC_DEVICE_CONTEXT_JOIN_DESTROY, &sub)); in TestAsyncCoherence()