ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
curand.h
Go to the documentation of this file.
1#if !defined(CURAND_H_)
2# define CURAND_H_
3
4# include "builtin_types.h"
5
11
18
19// #include <cuda_runtime.h>
20
21# ifndef CURANDAPI
22# ifdef _WIN32
23# define CURANDAPI __stdcall
24# else
25# define CURANDAPI
26# endif
27# endif
28
29# if defined(__cplusplus)
30extern "C"
31{
32# endif /* __cplusplus */
33
37
61
66
83
88
103
108
131
136
140 typedef unsigned int curandDirectionVectors32_t[32];
141
145 typedef unsigned long long curandDirectionVectors64_t[64];
146
150 struct curandGenerator_st;
151
155 typedef struct curandGenerator_st *curandGenerator_t;
156
160
221
278 curandGenerator_t *generator,
279 curandRngType_t rng_type);
280
294
309
325
345 curandGenerator_t generator,
346 unsigned long long seed);
347
365 curandGenerator_t generator,
366 unsigned long long offset);
367
391 curandGenerator_t generator,
392 curandOrdering_t order);
393
413 curandGenerator_t generator,
414 unsigned int num_dimensions);
415
443 curandGenerator_t generator,
444 unsigned int *outputPtr,
445 size_t num);
446
474 curandGenerator_t generator,
475 unsigned long long *outputPtr,
476 size_t num);
477
505 curandGenerator_t generator,
506 float *outputPtr,
507 size_t num);
508
538 curandGenerator_t generator,
539 double *outputPtr,
540 size_t num);
541
586 curandGenerator_t generator,
587 float *outputPtr,
588 size_t n,
589 float mean,
590 float stddev);
591
638 curandGenerator_t generator,
639 double *outputPtr,
640 size_t n,
641 double mean,
642 double stddev);
643
691 curandGenerator_t generator,
692 float *outputPtr,
693 size_t n,
694 float mean,
695 float stddev);
696
746 curandGenerator_t generator,
747 double *outputPtr,
748 size_t n,
749 double mean,
750 double stddev);
751
771
796
813 curandGetScrambleConstants32(unsigned int **constants);
814
839
856 curandGetScrambleConstants64(unsigned long long **constants);
857
861
862# if defined(__cplusplus)
863}
864# endif /* __cplusplus */
865
866#endif /* !defined(CURAND_H_) */
struct CUstream_st * cudaStream_t
Definition driver_types.h:36
curandStatus_t CURANDAPI curandGenerateNormalDouble(curandGenerator_t generator, double *outputPtr, size_t n, double mean, double stddev)
Generate normally distributed doubles.
enum curandStatus curandStatus_t
CURAND function call status types.
Definition curand.h:65
curandOrdering
CURAND orderings of results in memory.
Definition curand.h:93
curandStatus_t CURANDAPI curandGenerateLogNormalDouble(curandGenerator_t generator, double *outputPtr, size_t n, double mean, double stddev)
Generate log-normally distributed doubles.
curandStatus_t CURANDAPI curandGenerateLogNormal(curandGenerator_t generator, float *outputPtr, size_t n, float mean, float stddev)
Generate log-normally distributed floats.
curandStatus_t CURANDAPI curandCreateGeneratorHost(curandGenerator_t *generator, curandRngType_t rng_type)
Create new host CPU random number generator.
curandStatus_t CURANDAPI curandGetDirectionVectors32(curandDirectionVectors32_t *vectors[], curandDirectionVectorSet_t set)
Get direction vectors for 32-bit quasirandom number generation.
unsigned int curandDirectionVectors32_t[32]
CURAND array of 32-bit direction vectors.
Definition curand.h:140
curandStatus_t CURANDAPI curandCreateGenerator(curandGenerator_t *generator, curandRngType_t rng_type)
Create new random number generator.
#define CURANDAPI
Definition curand.h:25
struct curandGenerator_st * curandGenerator_t
CURAND generator.
Definition curand.h:155
curandStatus_t CURANDAPI curandGenerateUniform(curandGenerator_t generator, float *outputPtr, size_t num)
Generate uniformly distributed floats.
curandDirectionVectorSet
CURAND choice of direction vector set.
Definition curand.h:113
enum curandDirectionVectorSet curandDirectionVectorSet_t
CURAND choice of direction vector set.
Definition curand.h:135
curandStatus_t CURANDAPI curandGenerateSeeds(curandGenerator_t generator)
Setup starting states.
curandStatus_t CURANDAPI curandDestroyGenerator(curandGenerator_t generator)
Destroy an existing generator.
curandStatus_t CURANDAPI curandGetVersion(int *version)
Return the version number of the library.
curandStatus_t CURANDAPI curandSetGeneratorOffset(curandGenerator_t generator, unsigned long long offset)
Set the absolute offset of the pseudo or quasirandom number generator.
curandStatus_t CURANDAPI curandGenerateNormal(curandGenerator_t generator, float *outputPtr, size_t n, float mean, float stddev)
Generate normally distributed floats.
curandStatus
CURAND Host API datatypes.
Definition curand.h:42
curandStatus_t CURANDAPI curandGenerateUniformDouble(curandGenerator_t generator, double *outputPtr, size_t num)
Generate uniformly distributed doubles.
curandStatus_t CURANDAPI curandSetPseudoRandomGeneratorSeed(curandGenerator_t generator, unsigned long long seed)
Set the seed value of the pseudo-random number generator.
enum curandRngType curandRngType_t
CURAND generator types.
Definition curand.h:87
curandStatus_t CURANDAPI curandGetScrambleConstants32(unsigned int **constants)
Get scramble constants for 32-bit scrambled Sobol' .
curandStatus_t CURANDAPI curandSetStream(curandGenerator_t generator, cudaStream_t stream)
Set the current stream for CURAND kernel launches.
unsigned long long curandDirectionVectors64_t[64]
CURAND array of 64-bit direction vectors.
Definition curand.h:145
curandStatus_t CURANDAPI curandGetScrambleConstants64(unsigned long long **constants)
Get scramble constants for 64-bit scrambled Sobol' .
curandStatus_t CURANDAPI curandSetQuasiRandomGeneratorDimensions(curandGenerator_t generator, unsigned int num_dimensions)
Set the number of dimensions.
curandStatus_t CURANDAPI curandGenerateLongLong(curandGenerator_t generator, unsigned long long *outputPtr, size_t num)
Generate 64-bit quasirandom numbers.
enum curandOrdering curandOrdering_t
CURAND orderings of results in memory.
Definition curand.h:107
curandRngType
CURAND generator types.
Definition curand.h:71
curandStatus_t CURANDAPI curandGetDirectionVectors64(curandDirectionVectors64_t *vectors[], curandDirectionVectorSet_t set)
Get direction vectors for 64-bit quasirandom number generation.
curandStatus_t CURANDAPI curandGenerate(curandGenerator_t generator, unsigned int *outputPtr, size_t num)
Generate 32-bit pseudo or quasirandom numbers.
curandStatus_t CURANDAPI curandSetGeneratorOrdering(curandGenerator_t generator, curandOrdering_t order)
Set the ordering of results of the pseudo or quasirandom number generator.
@ CURAND_ORDERING_PSEUDO_BEST
Best ordering for pseudorandom results.
Definition curand.h:94
@ CURAND_ORDERING_PSEUDO_SEEDED
Specific seeding pattern for fast lower quality pseudorandom results.
Definition curand.h:98
@ CURAND_ORDERING_QUASI_DEFAULT
Specific n-dimensional ordering for quasirandom results.
Definition curand.h:100
@ CURAND_ORDERING_PSEUDO_DEFAULT
Specific default 4096 thread sequence for pseudorandom results.
Definition curand.h:96
@ CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6
Specific set of 32-bit direction vectors generated from polynomials recommended by S.
Definition curand.h:118
@ CURAND_DIRECTION_VECTORS_32_JOEKUO6
Specific set of 32-bit direction vectors generated from polynomials recommended by S.
Definition curand.h:114
@ CURAND_DIRECTION_VECTORS_64_JOEKUO6
Specific set of 64-bit direction vectors generated from polynomials recommended by S.
Definition curand.h:122
@ CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6
Specific set of 64-bit direction vectors generated from polynomials recommended by S.
Definition curand.h:126
@ CURAND_STATUS_INITIALIZATION_FAILED
Initialization of CUDA failed.
Definition curand.h:55
@ CURAND_STATUS_NOT_INITIALIZED
Generator not initialized.
Definition curand.h:46
@ CURAND_STATUS_ALLOCATION_FAILED
Memory allocation failed.
Definition curand.h:47
@ CURAND_STATUS_TYPE_ERROR
Generator is wrong type.
Definition curand.h:48
@ CURAND_STATUS_PREEXISTING_FAILURE
Preexisting failure on library entry.
Definition curand.h:53
@ CURAND_STATUS_LAUNCH_FAILURE
Kernel launch failure.
Definition curand.h:52
@ CURAND_STATUS_INTERNAL_ERROR
Internal library error.
Definition curand.h:59
@ CURAND_STATUS_ARCH_MISMATCH
Architecture mismatch, GPU does not support requested feature.
Definition curand.h:57
@ CURAND_STATUS_VERSION_MISMATCH
Header file and linked library version do not match.
Definition curand.h:44
@ CURAND_STATUS_OUT_OF_RANGE
Argument out of range.
Definition curand.h:49
@ CURAND_STATUS_SUCCESS
No errors.
Definition curand.h:43
@ CURAND_STATUS_LENGTH_NOT_MULTIPLE
Length requested is not a multple of dimension.
Definition curand.h:50
@ CURAND_RNG_QUASI_SOBOL32
Sobol32 quasirandom generator.
Definition curand.h:76
@ CURAND_RNG_TEST
Definition curand.h:72
@ CURAND_RNG_PSEUDO_XORWOW
XORWOW pseudorandom generator.
Definition curand.h:74
@ CURAND_RNG_QUASI_DEFAULT
Default quasirandom generator.
Definition curand.h:75
@ CURAND_RNG_QUASI_SOBOL64
Sobol64 quasirandom generator.
Definition curand.h:79
@ CURAND_RNG_PSEUDO_DEFAULT
Default pseudorandom generator.
Definition curand.h:73
@ CURAND_RNG_QUASI_SCRAMBLED_SOBOL32
Scrambled Sobol32 quasirandom generator.
Definition curand.h:77
@ CURAND_RNG_QUASI_SCRAMBLED_SOBOL64
Scrambled Sobol64 quasirandom generator.
Definition curand.h:80