Lines Matching full:r
9 static PetscErrorCode PetscRandomSeed_CURAND(PetscRandom r) in PetscRandomSeed_CURAND() argument
11 PetscRandom_CURAND *curand = (PetscRandom_CURAND *)r->data; in PetscRandomSeed_CURAND()
14 PetscCallCURAND(curandSetPseudoRandomGeneratorSeed(curand->gen, r->seed)); in PetscRandomSeed_CURAND()
20 static PetscErrorCode PetscRandomGetValuesReal_CURAND(PetscRandom r, PetscInt n, PetscReal *val) in PetscRandomGetValuesReal_CURAND() argument
22 PetscRandom_CURAND *curand = (PetscRandom_CURAND *)r->data; in PetscRandomGetValuesReal_CURAND()
31 if (r->iset) PetscCall(PetscRandomCurandScale_Private(r, nn, val, (PetscBool)(n < 0))); in PetscRandomGetValuesReal_CURAND()
35 static PetscErrorCode PetscRandomGetValues_CURAND(PetscRandom r, PetscInt n, PetscScalar *val) in PetscRandomGetValues_CURAND() argument
40 PetscCall(PetscRandomGetValuesReal_CURAND(r, -n, (PetscReal *)val)); in PetscRandomGetValues_CURAND()
42 PetscCall(PetscRandomGetValuesReal_CURAND(r, n, val)); in PetscRandomGetValues_CURAND()
47 static PetscErrorCode PetscRandomDestroy_CURAND(PetscRandom r) in PetscRandomDestroy_CURAND() argument
49 PetscRandom_CURAND *curand = (PetscRandom_CURAND *)r->data; in PetscRandomDestroy_CURAND()
53 PetscCall(PetscFree(r->data)); in PetscRandomDestroy_CURAND()
77 PETSC_EXTERN PetscErrorCode PetscRandomCreate_CURAND(PetscRandom r) in PetscRandomCreate_CURAND() argument
92 r->ops[0] = PetscRandomOps_Values; in PetscRandomCreate_CURAND()
93 PetscCall(PetscObjectChangeTypeName((PetscObject)r, PETSCCURAND)); in PetscRandomCreate_CURAND()
94 r->data = curand; in PetscRandomCreate_CURAND()
95 PetscCall(PetscRandomSeed_CURAND(r)); in PetscRandomCreate_CURAND()