Package org.bytedeco.cuda.global
Class curand
- java.lang.Object
-
- org.bytedeco.cuda.presets.curand
-
- org.bytedeco.cuda.global.curand
-
- All Implemented Interfaces:
InfoMapper
public class curand extends curand
-
-
Field Summary
Fields Modifier and Type Field Description static intCURAND_3RDenum curandMethodstatic intCURAND_BINARY_SEARCHenum curandMethodstatic intCURAND_CHOOSE_BESTenum curandMethodstatic intCURAND_DEFINITIONenum curandMethodstatic intCURAND_DEVICE_APIenum curandMethodstatic intCURAND_DIRECTION_VECTORS_32_JOEKUO6enum curandDirectionVectorSetstatic intCURAND_DIRECTION_VECTORS_64_JOEKUO6enum curandDirectionVectorSetstatic intCURAND_DISCRETE_GAUSSenum curandMethodstatic intCURAND_FAST_REJECTIONenum curandMethodstatic intCURAND_HITRenum curandMethodstatic intCURAND_ITRenum curandMethodstatic intCURAND_KNUTHenum curandMethodstatic intCURAND_M1enum curandMethodstatic intCURAND_M2enum curandMethodstatic intCURAND_ORDERING_PSEUDO_BESTenum curandOrderingstatic intCURAND_ORDERING_PSEUDO_DEFAULTenum curandOrderingstatic intCURAND_ORDERING_PSEUDO_SEEDEDenum curandOrderingstatic intCURAND_ORDERING_QUASI_DEFAULTenum curandOrderingstatic intCURAND_POISSONenum curandMethodstatic intCURAND_REJECTIONenum curandMethodstatic intCURAND_RNG_PSEUDO_DEFAULTenum curandRngTypestatic intCURAND_RNG_PSEUDO_MRG32K3Aenum curandRngTypestatic intCURAND_RNG_PSEUDO_MT19937enum curandRngTypestatic intCURAND_RNG_PSEUDO_MTGP32enum curandRngTypestatic intCURAND_RNG_PSEUDO_PHILOX4_32_10enum curandRngTypestatic intCURAND_RNG_PSEUDO_XORWOWenum curandRngTypestatic intCURAND_RNG_QUASI_DEFAULTenum curandRngTypestatic intCURAND_RNG_QUASI_SCRAMBLED_SOBOL32enum curandRngTypestatic intCURAND_RNG_QUASI_SCRAMBLED_SOBOL64enum curandRngTypestatic intCURAND_RNG_QUASI_SOBOL32enum curandRngTypestatic intCURAND_RNG_QUASI_SOBOL64enum curandRngTypestatic intCURAND_RNG_TESTenum curandRngTypestatic intCURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6enum curandDirectionVectorSetstatic intCURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6enum curandDirectionVectorSetstatic intCURAND_STATUS_ALLOCATION_FAILEDenum curandStatusstatic intCURAND_STATUS_ARCH_MISMATCHenum curandStatusstatic intCURAND_STATUS_DOUBLE_PRECISION_REQUIREDenum curandStatusstatic intCURAND_STATUS_INITIALIZATION_FAILEDenum curandStatusstatic intCURAND_STATUS_INTERNAL_ERRORenum curandStatusstatic intCURAND_STATUS_LAUNCH_FAILUREenum curandStatusstatic intCURAND_STATUS_LENGTH_NOT_MULTIPLEenum curandStatusstatic intCURAND_STATUS_NOT_INITIALIZEDenum curandStatusstatic intCURAND_STATUS_OUT_OF_RANGEenum curandStatusstatic intCURAND_STATUS_PREEXISTING_FAILUREenum curandStatusstatic intCURAND_STATUS_SUCCESSenum curandStatusstatic intCURAND_STATUS_TYPE_ERRORenum curandStatusstatic intCURAND_STATUS_VERSION_MISMATCHenum curandStatusstatic intCURAND_VER_BUILDstatic intCURAND_VER_MAJOR\defgroup HOST Host API \{static intCURAND_VER_MINORstatic intCURAND_VER_PATCHstatic intCURAND_VERSION
-
Constructor Summary
Constructors Constructor Description curand()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcurandCreateGenerator(curandGenerator_st generator, int rng_type)\brief Create new random number generator.static intcurandCreateGeneratorHost(curandGenerator_st generator, int rng_type)\brief Create new host CPU random number generator.static intcurandCreatePoissonDistribution(double lambda, curandDiscreteDistribution_st discrete_distribution)\brief Construct the histogram array for a Poisson distribution.static intcurandDestroyDistribution(curandDiscreteDistribution_st discrete_distribution)\brief Destroy the histogram array for a discrete distribution (e.g.static intcurandDestroyGenerator(curandGenerator_st generator)\brief Destroy an existing generator.static intcurandGenerate(curandGenerator_st generator, int[] outputPtr, long num)static intcurandGenerate(curandGenerator_st generator, IntBuffer outputPtr, long num)static intcurandGenerate(curandGenerator_st generator, IntPointer outputPtr, long num)\brief Generate 32-bit pseudo or quasirandom numbers.static intcurandGenerateLogNormal(curandGenerator_st generator, float[] outputPtr, long n, float mean, float stddev)static intcurandGenerateLogNormal(curandGenerator_st generator, FloatBuffer outputPtr, long n, float mean, float stddev)static intcurandGenerateLogNormal(curandGenerator_st generator, FloatPointer outputPtr, long n, float mean, float stddev)\brief Generate log-normally distributed floats.static intcurandGenerateLogNormalDouble(curandGenerator_st generator, double[] outputPtr, long n, double mean, double stddev)static intcurandGenerateLogNormalDouble(curandGenerator_st generator, DoubleBuffer outputPtr, long n, double mean, double stddev)static intcurandGenerateLogNormalDouble(curandGenerator_st generator, DoublePointer outputPtr, long n, double mean, double stddev)\brief Generate log-normally distributed doubles.static intcurandGenerateLongLong(curandGenerator_st generator, long[] outputPtr, long num)static intcurandGenerateLongLong(curandGenerator_st generator, LongBuffer outputPtr, long num)static intcurandGenerateLongLong(curandGenerator_st generator, LongPointer outputPtr, long num)\brief Generate 64-bit quasirandom numbers.static intcurandGenerateNormal(curandGenerator_st generator, float[] outputPtr, long n, float mean, float stddev)static intcurandGenerateNormal(curandGenerator_st generator, FloatBuffer outputPtr, long n, float mean, float stddev)static intcurandGenerateNormal(curandGenerator_st generator, FloatPointer outputPtr, long n, float mean, float stddev)\brief Generate normally distributed doubles.static intcurandGenerateNormalDouble(curandGenerator_st generator, double[] outputPtr, long n, double mean, double stddev)static intcurandGenerateNormalDouble(curandGenerator_st generator, DoubleBuffer outputPtr, long n, double mean, double stddev)static intcurandGenerateNormalDouble(curandGenerator_st generator, DoublePointer outputPtr, long n, double mean, double stddev)\brief Generate normally distributed doubles.static intcurandGeneratePoisson(curandGenerator_st generator, int[] outputPtr, long n, double lambda)static intcurandGeneratePoisson(curandGenerator_st generator, IntBuffer outputPtr, long n, double lambda)static intcurandGeneratePoisson(curandGenerator_st generator, IntPointer outputPtr, long n, double lambda)\brief Generate Poisson-distributed unsigned ints.static intcurandGeneratePoissonMethod(curandGenerator_st generator, int[] outputPtr, long n, double lambda, int method)static intcurandGeneratePoissonMethod(curandGenerator_st generator, IntBuffer outputPtr, long n, double lambda, int method)static intcurandGeneratePoissonMethod(curandGenerator_st generator, IntPointer outputPtr, long n, double lambda, int method)static intcurandGenerateSeeds(curandGenerator_st generator)\brief Setup starting states.static intcurandGenerateUniform(curandGenerator_st generator, float[] outputPtr, long num)static intcurandGenerateUniform(curandGenerator_st generator, FloatBuffer outputPtr, long num)static intcurandGenerateUniform(curandGenerator_st generator, FloatPointer outputPtr, long num)\brief Generate uniformly distributed floats.static intcurandGenerateUniformDouble(curandGenerator_st generator, double[] outputPtr, long num)static intcurandGenerateUniformDouble(curandGenerator_st generator, DoubleBuffer outputPtr, long num)static intcurandGenerateUniformDouble(curandGenerator_st generator, DoublePointer outputPtr, long num)\brief Generate uniformly distributed doubles.static intcurandGetDirectionVectors32(int[] vectors, int set)static intcurandGetDirectionVectors32(IntBuffer vectors, int set)static intcurandGetDirectionVectors32(IntPointer vectors, int set)static intcurandGetDirectionVectors32(PointerPointer vectors, int set)\brief Get direction vectors for 32-bit quasirandom number generation.static intcurandGetDirectionVectors64(long[] vectors, int set)static intcurandGetDirectionVectors64(LongBuffer vectors, int set)static intcurandGetDirectionVectors64(LongPointer vectors, int set)static intcurandGetDirectionVectors64(PointerPointer vectors, int set)\brief Get direction vectors for 64-bit quasirandom number generation.static intcurandGetProperty(int type, int[] value)static intcurandGetProperty(int type, IntBuffer value)static intcurandGetProperty(int type, IntPointer value)\brief Return the value of the curand property.static intcurandGetScrambleConstants32(int[] constants)static intcurandGetScrambleConstants32(IntBuffer constants)static intcurandGetScrambleConstants32(IntPointer constants)static intcurandGetScrambleConstants32(PointerPointer constants)\brief Get scramble constants for 32-bit scrambled Sobol' .static intcurandGetScrambleConstants64(long[] constants)static intcurandGetScrambleConstants64(LongBuffer constants)static intcurandGetScrambleConstants64(LongPointer constants)static intcurandGetScrambleConstants64(PointerPointer constants)\brief Get scramble constants for 64-bit scrambled Sobol' .static intcurandGetVersion(int[] version)static intcurandGetVersion(IntBuffer version)static intcurandGetVersion(IntPointer version)\brief Return the version number of the library.static intcurandSetGeneratorOffset(curandGenerator_st generator, long offset)\brief Set the absolute offset of the pseudo or quasirandom number generator.static intcurandSetGeneratorOrdering(curandGenerator_st generator, int order)\brief Set the ordering of results of the pseudo or quasirandom number generator.static intcurandSetPseudoRandomGeneratorSeed(curandGenerator_st generator, long seed)\brief Set the seed value of the pseudo-random number generator.static intcurandSetQuasiRandomGeneratorDimensions(curandGenerator_st generator, int num_dimensions)\brief Set the number of dimensions.static intcurandSetStream(curandGenerator_st generator, CUstream_st stream)\brief Set the current stream for CURAND kernel launches.
-
-
-
Field Detail
-
CURAND_VER_MAJOR
public static final int CURAND_VER_MAJOR
\defgroup HOST Host API \{- See Also:
- Constant Field Values
-
CURAND_VER_MINOR
public static final int CURAND_VER_MINOR
- See Also:
- Constant Field Values
-
CURAND_VER_PATCH
public static final int CURAND_VER_PATCH
- See Also:
- Constant Field Values
-
CURAND_VER_BUILD
public static final int CURAND_VER_BUILD
- See Also:
- Constant Field Values
-
CURAND_VERSION
public static final int CURAND_VERSION
- See Also:
- Constant Field Values
-
CURAND_STATUS_SUCCESS
public static final int CURAND_STATUS_SUCCESS
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_VERSION_MISMATCH
public static final int CURAND_STATUS_VERSION_MISMATCH
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_NOT_INITIALIZED
public static final int CURAND_STATUS_NOT_INITIALIZED
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_ALLOCATION_FAILED
public static final int CURAND_STATUS_ALLOCATION_FAILED
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_TYPE_ERROR
public static final int CURAND_STATUS_TYPE_ERROR
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_OUT_OF_RANGE
public static final int CURAND_STATUS_OUT_OF_RANGE
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_LENGTH_NOT_MULTIPLE
public static final int CURAND_STATUS_LENGTH_NOT_MULTIPLE
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_DOUBLE_PRECISION_REQUIRED
public static final int CURAND_STATUS_DOUBLE_PRECISION_REQUIRED
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_LAUNCH_FAILURE
public static final int CURAND_STATUS_LAUNCH_FAILURE
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_PREEXISTING_FAILURE
public static final int CURAND_STATUS_PREEXISTING_FAILURE
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_INITIALIZATION_FAILED
public static final int CURAND_STATUS_INITIALIZATION_FAILED
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_ARCH_MISMATCH
public static final int CURAND_STATUS_ARCH_MISMATCH
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_STATUS_INTERNAL_ERROR
public static final int CURAND_STATUS_INTERNAL_ERROR
enum curandStatus- See Also:
- Constant Field Values
-
CURAND_RNG_TEST
public static final int CURAND_RNG_TEST
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_PSEUDO_DEFAULT
public static final int CURAND_RNG_PSEUDO_DEFAULT
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_PSEUDO_XORWOW
public static final int CURAND_RNG_PSEUDO_XORWOW
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_PSEUDO_MRG32K3A
public static final int CURAND_RNG_PSEUDO_MRG32K3A
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_PSEUDO_MTGP32
public static final int CURAND_RNG_PSEUDO_MTGP32
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_PSEUDO_MT19937
public static final int CURAND_RNG_PSEUDO_MT19937
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_PSEUDO_PHILOX4_32_10
public static final int CURAND_RNG_PSEUDO_PHILOX4_32_10
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_QUASI_DEFAULT
public static final int CURAND_RNG_QUASI_DEFAULT
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_QUASI_SOBOL32
public static final int CURAND_RNG_QUASI_SOBOL32
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_QUASI_SCRAMBLED_SOBOL32
public static final int CURAND_RNG_QUASI_SCRAMBLED_SOBOL32
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_QUASI_SOBOL64
public static final int CURAND_RNG_QUASI_SOBOL64
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_RNG_QUASI_SCRAMBLED_SOBOL64
public static final int CURAND_RNG_QUASI_SCRAMBLED_SOBOL64
enum curandRngType- See Also:
- Constant Field Values
-
CURAND_ORDERING_PSEUDO_BEST
public static final int CURAND_ORDERING_PSEUDO_BEST
enum curandOrdering- See Also:
- Constant Field Values
-
CURAND_ORDERING_PSEUDO_DEFAULT
public static final int CURAND_ORDERING_PSEUDO_DEFAULT
enum curandOrdering- See Also:
- Constant Field Values
-
CURAND_ORDERING_PSEUDO_SEEDED
public static final int CURAND_ORDERING_PSEUDO_SEEDED
enum curandOrdering- See Also:
- Constant Field Values
-
CURAND_ORDERING_QUASI_DEFAULT
public static final int CURAND_ORDERING_QUASI_DEFAULT
enum curandOrdering- See Also:
- Constant Field Values
-
CURAND_DIRECTION_VECTORS_32_JOEKUO6
public static final int CURAND_DIRECTION_VECTORS_32_JOEKUO6
enum curandDirectionVectorSet- See Also:
- Constant Field Values
-
CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6
public static final int CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6
enum curandDirectionVectorSet- See Also:
- Constant Field Values
-
CURAND_DIRECTION_VECTORS_64_JOEKUO6
public static final int CURAND_DIRECTION_VECTORS_64_JOEKUO6
enum curandDirectionVectorSet- See Also:
- Constant Field Values
-
CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6
public static final int CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6
enum curandDirectionVectorSet- See Also:
- Constant Field Values
-
CURAND_CHOOSE_BEST
public static final int CURAND_CHOOSE_BEST
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_ITR
public static final int CURAND_ITR
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_KNUTH
public static final int CURAND_KNUTH
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_HITR
public static final int CURAND_HITR
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_M1
public static final int CURAND_M1
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_M2
public static final int CURAND_M2
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_BINARY_SEARCH
public static final int CURAND_BINARY_SEARCH
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_DISCRETE_GAUSS
public static final int CURAND_DISCRETE_GAUSS
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_REJECTION
public static final int CURAND_REJECTION
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_DEVICE_API
public static final int CURAND_DEVICE_API
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_FAST_REJECTION
public static final int CURAND_FAST_REJECTION
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_3RD
public static final int CURAND_3RD
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_DEFINITION
public static final int CURAND_DEFINITION
enum curandMethod- See Also:
- Constant Field Values
-
CURAND_POISSON
public static final int CURAND_POISSON
enum curandMethod- See Also:
- Constant Field Values
-
-
Method Detail
-
curandCreateGenerator
@Cast("curandStatus_t") public static int curandCreateGenerator(@ByPtrPtr curandGenerator_st generator, @Cast("curandRngType_t") int rng_type)
\brief Create new random number generator. Creates a new random number generator of type \p rng_type and returns it in \p *generator. Legal values for \p rng_type are: - CURAND_RNG_PSEUDO_DEFAULT - CURAND_RNG_PSEUDO_XORWOW - CURAND_RNG_PSEUDO_MRG32K3A - CURAND_RNG_PSEUDO_MTGP32 - CURAND_RNG_PSEUDO_MT19937 - CURAND_RNG_PSEUDO_PHILOX4_32_10 - CURAND_RNG_QUASI_DEFAULT - CURAND_RNG_QUASI_SOBOL32 - CURAND_RNG_QUASI_SCRAMBLED_SOBOL32 - CURAND_RNG_QUASI_SOBOL64 - CURAND_RNG_QUASI_SCRAMBLED_SOBOL64 When \p rng_type is CURAND_RNG_PSEUDO_DEFAULT, the type chosen is CURAND_RNG_PSEUDO_XORWOW. \n When \p rng_type is CURAND_RNG_QUASI_DEFAULT, the type chosen is CURAND_RNG_QUASI_SOBOL32. The default values for \p rng_type = CURAND_RNG_PSEUDO_XORWOW are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_PSEUDO_MRG32K3A are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_PSEUDO_MTGP32 are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_PSEUDO_MT19937 are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT * The default values for \p rng_type = CURAND_RNG_PSEUDO_PHILOX4_32_10 are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SOBOL32 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SOBOL64 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SCRAMBBLED_SOBOL32 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SCRAMBLED_SOBOL64 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT- Parameters:
generator- - Pointer to generatorrng_type- - Type of generator to create- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED, if memory could not be allocated \n - CURAND_STATUS_INITIALIZATION_FAILED if there was a problem setting up the GPU \n - CURAND_STATUS_VERSION_MISMATCH if the header file version does not match the dynamically linked library version \n - CURAND_STATUS_TYPE_ERROR if the value for \p rng_type is invalid \n - CURAND_STATUS_SUCCESS if generator was created successfully \n
-
curandCreateGeneratorHost
@Cast("curandStatus_t") public static int curandCreateGeneratorHost(@ByPtrPtr curandGenerator_st generator, @Cast("curandRngType_t") int rng_type)
\brief Create new host CPU random number generator. Creates a new host CPU random number generator of type \p rng_type and returns it in \p *generator. Legal values for \p rng_type are: - CURAND_RNG_PSEUDO_DEFAULT - CURAND_RNG_PSEUDO_XORWOW - CURAND_RNG_PSEUDO_MRG32K3A - CURAND_RNG_PSEUDO_MTGP32 - CURAND_RNG_PSEUDO_MT19937 - CURAND_RNG_PSEUDO_PHILOX4_32_10 - CURAND_RNG_QUASI_DEFAULT - CURAND_RNG_QUASI_SOBOL32 When \p rng_type is CURAND_RNG_PSEUDO_DEFAULT, the type chosen is CURAND_RNG_PSEUDO_XORWOW. \n When \p rng_type is CURAND_RNG_QUASI_DEFAULT, the type chosen is CURAND_RNG_QUASI_SOBOL32. The default values for \p rng_type = CURAND_RNG_PSEUDO_XORWOW are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_PSEUDO_MRG32K3A are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_PSEUDO_MTGP32 are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_PSEUDO_MT19937 are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT * The default values for \p rng_type = CURAND_RNG_PSEUDO_PHILOX4_32_10 are: - \p seed = 0 - \p offset = 0 - \p ordering = CURAND_ORDERING_PSEUDO_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SOBOL32 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SOBOL64 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SCRAMBLED_SOBOL32 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT The default values for \p rng_type = CURAND_RNG_QUASI_SCRAMBLED_SOBOL64 are: - \p dimensions = 1 - \p offset = 0 - \p ordering = CURAND_ORDERING_QUASI_DEFAULT- Parameters:
generator- - Pointer to generatorrng_type- - Type of generator to create- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_INITIALIZATION_FAILED if there was a problem setting up the GPU \n - CURAND_STATUS_VERSION_MISMATCH if the header file version does not match the dynamically linked library version \n - CURAND_STATUS_TYPE_ERROR if the value for \p rng_type is invalid \n - CURAND_STATUS_SUCCESS if generator was created successfully \n
-
curandDestroyGenerator
@Cast("curandStatus_t") public static int curandDestroyGenerator(curandGenerator_st generator)
\brief Destroy an existing generator. Destroy an existing generator and free all memory associated with its state.- Parameters:
generator- - Generator to destroy- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_SUCCESS if generator was destroyed successfully \n
-
curandGetVersion
@Cast("curandStatus_t") public static int curandGetVersion(IntPointer version)
\brief Return the version number of the library. Return in \p *version the version number of the dynamically linked CURAND library. The format is the same as CUDART_VERSION from the CUDA Runtime. The only supported configuration is CURAND version equal to CUDA Runtime version.- Parameters:
version- - CURAND library version- Returns:
- - CURAND_STATUS_SUCCESS if the version number was successfully returned \n
-
curandGetVersion
@Cast("curandStatus_t") public static int curandGetVersion(int[] version)
-
curandGetProperty
@Cast("curandStatus_t") public static int curandGetProperty(@Cast("libraryPropertyType") int type, IntPointer value)
\brief Return the value of the curand property. Return in \p *value the number for the property described by \p type of the dynamically linked CURAND library.- Parameters:
type- - CUDA library propertyvalue- - integer value for the requested property- Returns:
- - CURAND_STATUS_SUCCESS if the property value was successfully returned \n - CURAND_STATUS_OUT_OF_RANGE if the property type is not recognized \n
-
curandGetProperty
@Cast("curandStatus_t") public static int curandGetProperty(@Cast("libraryPropertyType") int type, IntBuffer value)
-
curandGetProperty
@Cast("curandStatus_t") public static int curandGetProperty(@Cast("libraryPropertyType") int type, int[] value)
-
curandSetStream
@Cast("curandStatus_t") public static int curandSetStream(curandGenerator_st generator, CUstream_st stream)
\brief Set the current stream for CURAND kernel launches. Set the current stream for CURAND kernel launches. All library functions will use this stream until set again.- Parameters:
generator- - Generator to modifystream- - Stream to use or ::NULL for null stream- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_SUCCESS if stream was set successfully \n
-
curandSetPseudoRandomGeneratorSeed
@Cast("curandStatus_t") public static int curandSetPseudoRandomGeneratorSeed(curandGenerator_st generator, @Cast("unsigned long long") long seed)
\brief Set the seed value of the pseudo-random number generator. Set the seed value of the pseudorandom number generator. All values of seed are valid. Different seeds will produce different sequences. Different seeds will often not be statistically correlated with each other, but some pairs of seed values may generate sequences which are statistically correlated.- Parameters:
generator- - Generator to modifyseed- - Seed value- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_TYPE_ERROR if the generator is not a pseudorandom number generator \n - CURAND_STATUS_SUCCESS if generator seed was set successfully \n
-
curandSetGeneratorOffset
@Cast("curandStatus_t") public static int curandSetGeneratorOffset(curandGenerator_st generator, @Cast("unsigned long long") long offset)
\brief Set the absolute offset of the pseudo or quasirandom number generator. Set the absolute offset of the pseudo or quasirandom number generator. All values of offset are valid. The offset position is absolute, not relative to the current position in the sequence.- Parameters:
generator- - Generator to modifyoffset- - Absolute offset position- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_SUCCESS if generator offset was set successfully \n
-
curandSetGeneratorOrdering
@Cast("curandStatus_t") public static int curandSetGeneratorOrdering(curandGenerator_st generator, @Cast("curandOrdering_t") int order)
\brief Set the ordering of results of the pseudo or quasirandom number generator. Set the ordering of results of the pseudo or quasirandom number generator. Legal values of \p order for pseudorandom generators are: - CURAND_ORDERING_PSEUDO_DEFAULT - CURAND_ORDERING_PSEUDO_BEST - CURAND_ORDERING_PSEUDO_SEEDED Legal values of \p order for quasirandom generators are: - CURAND_ORDERING_QUASI_DEFAULT- Parameters:
generator- - Generator to modifyorder- - Ordering of results- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_OUT_OF_RANGE if the ordering is not valid \n - CURAND_STATUS_SUCCESS if generator ordering was set successfully \n
-
curandSetQuasiRandomGeneratorDimensions
@Cast("curandStatus_t") public static int curandSetQuasiRandomGeneratorDimensions(curandGenerator_st generator, @Cast("unsigned int") int num_dimensions)
\brief Set the number of dimensions. Set the number of dimensions to be generated by the quasirandom number generator. Legal values for \p num_dimensions are 1 to 20000.- Parameters:
generator- - Generator to modifynum_dimensions- - Number of dimensions- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_OUT_OF_RANGE if num_dimensions is not valid \n - CURAND_STATUS_TYPE_ERROR if the generator is not a quasirandom number generator \n - CURAND_STATUS_SUCCESS if generator ordering was set successfully \n
-
curandGenerate
@Cast("curandStatus_t") public static int curandGenerate(curandGenerator_st generator, @Cast("unsigned int*") IntPointer outputPtr, @Cast("size_t") long num)
\brief Generate 32-bit pseudo or quasirandom numbers. Use \p generator to generate \p num 32-bit results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 32-bit values with every bit random.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsnum- - Number of random 32-bit values to generate- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_TYPE_ERROR if the generator is a 64 bit quasirandom generator. (use ::curandGenerateLongLong() with 64 bit quasirandom generators) - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerate
@Cast("curandStatus_t") public static int curandGenerate(curandGenerator_st generator, @Cast("unsigned int*") IntBuffer outputPtr, @Cast("size_t") long num)
-
curandGenerate
@Cast("curandStatus_t") public static int curandGenerate(curandGenerator_st generator, @Cast("unsigned int*") int[] outputPtr, @Cast("size_t") long num)
-
curandGenerateLongLong
@Cast("curandStatus_t") public static int curandGenerateLongLong(curandGenerator_st generator, @Cast("unsigned long long*") LongPointer outputPtr, @Cast("size_t") long num)
\brief Generate 64-bit quasirandom numbers. Use \p generator to generate \p num 64-bit results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 64-bit values with every bit random.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsnum- - Number of random 64-bit values to generate- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_TYPE_ERROR if the generator is not a 64 bit quasirandom generator\n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerateLongLong
@Cast("curandStatus_t") public static int curandGenerateLongLong(curandGenerator_st generator, @Cast("unsigned long long*") LongBuffer outputPtr, @Cast("size_t") long num)
-
curandGenerateLongLong
@Cast("curandStatus_t") public static int curandGenerateLongLong(curandGenerator_st generator, @Cast("unsigned long long*") long[] outputPtr, @Cast("size_t") long num)
-
curandGenerateUniform
@Cast("curandStatus_t") public static int curandGenerateUniform(curandGenerator_st generator, FloatPointer outputPtr, @Cast("size_t") long num)
\brief Generate uniformly distributed floats. Use \p generator to generate \p num float results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 32-bit floating point values between \p 0.0f and \p 1.0f, excluding \p 0.0f and including \p 1.0f.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsnum- - Number of floats to generate- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension \n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerateUniform
@Cast("curandStatus_t") public static int curandGenerateUniform(curandGenerator_st generator, FloatBuffer outputPtr, @Cast("size_t") long num)
-
curandGenerateUniform
@Cast("curandStatus_t") public static int curandGenerateUniform(curandGenerator_st generator, float[] outputPtr, @Cast("size_t") long num)
-
curandGenerateUniformDouble
@Cast("curandStatus_t") public static int curandGenerateUniformDouble(curandGenerator_st generator, DoublePointer outputPtr, @Cast("size_t") long num)
\brief Generate uniformly distributed doubles. Use \p generator to generate \p num double results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 64-bit double precision floating point values between \p 0.0 and \p 1.0, excluding \p 0.0 and including \p 1.0.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsnum- - Number of doubles to generate- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension \n - CURAND_STATUS_DOUBLE_PRECISION_REQUIRED if the GPU does not support double precision \n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerateUniformDouble
@Cast("curandStatus_t") public static int curandGenerateUniformDouble(curandGenerator_st generator, DoubleBuffer outputPtr, @Cast("size_t") long num)
-
curandGenerateUniformDouble
@Cast("curandStatus_t") public static int curandGenerateUniformDouble(curandGenerator_st generator, double[] outputPtr, @Cast("size_t") long num)
-
curandGenerateNormal
@Cast("curandStatus_t") public static int curandGenerateNormal(curandGenerator_st generator, FloatPointer outputPtr, @Cast("size_t") long n, float mean, float stddev)
\brief Generate normally distributed doubles. Use \p generator to generate \p n float results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 32-bit floating point values with mean \p mean and standard deviation \p stddev. Normally distributed results are generated from pseudorandom generators with a Box-Muller transform, and so require \p n to be even. Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality. There may be slight numerical differences between results generated on the GPU with generators created with ::curandCreateGenerator() and results calculated on the CPU with generators created with ::curandCreateGeneratorHost(). These differences arise because of differences in results for transcendental functions. In addition, future versions of CURAND may use newer versions of the CUDA math library, so different versions of CURAND may give slightly different numerical values.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsn- - Number of floats to generatemean- - Mean of normal distributionstddev- - Standard deviation of normal distribution- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension, or is not a multiple of two for pseudorandom generators \n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerateNormal
@Cast("curandStatus_t") public static int curandGenerateNormal(curandGenerator_st generator, FloatBuffer outputPtr, @Cast("size_t") long n, float mean, float stddev)
-
curandGenerateNormal
@Cast("curandStatus_t") public static int curandGenerateNormal(curandGenerator_st generator, float[] outputPtr, @Cast("size_t") long n, float mean, float stddev)
-
curandGenerateNormalDouble
@Cast("curandStatus_t") public static int curandGenerateNormalDouble(curandGenerator_st generator, DoublePointer outputPtr, @Cast("size_t") long n, double mean, double stddev)
\brief Generate normally distributed doubles. Use \p generator to generate \p n double results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 64-bit floating point values with mean \p mean and standard deviation \p stddev. Normally distributed results are generated from pseudorandom generators with a Box-Muller transform, and so require \p n to be even. Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality. There may be slight numerical differences between results generated on the GPU with generators created with ::curandCreateGenerator() and results calculated on the CPU with generators created with ::curandCreateGeneratorHost(). These differences arise because of differences in results for transcendental functions. In addition, future versions of CURAND may use newer versions of the CUDA math library, so different versions of CURAND may give slightly different numerical values.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsn- - Number of doubles to generatemean- - Mean of normal distributionstddev- - Standard deviation of normal distribution- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension, or is not a multiple of two for pseudorandom generators \n - CURAND_STATUS_DOUBLE_PRECISION_REQUIRED if the GPU does not support double precision \n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerateNormalDouble
@Cast("curandStatus_t") public static int curandGenerateNormalDouble(curandGenerator_st generator, DoubleBuffer outputPtr, @Cast("size_t") long n, double mean, double stddev)
-
curandGenerateNormalDouble
@Cast("curandStatus_t") public static int curandGenerateNormalDouble(curandGenerator_st generator, double[] outputPtr, @Cast("size_t") long n, double mean, double stddev)
-
curandGenerateLogNormal
@Cast("curandStatus_t") public static int curandGenerateLogNormal(curandGenerator_st generator, FloatPointer outputPtr, @Cast("size_t") long n, float mean, float stddev)
\brief Generate log-normally distributed floats. Use \p generator to generate \p n float results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 32-bit floating point values with log-normal distribution based on an associated normal distribution with mean \p mean and standard deviation \p stddev. Normally distributed results are generated from pseudorandom generators with a Box-Muller transform, and so require \p n to be even. Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality. The normally distributed results are transformed into log-normal distribution. There may be slight numerical differences between results generated on the GPU with generators created with ::curandCreateGenerator() and results calculated on the CPU with generators created with ::curandCreateGeneratorHost(). These differences arise because of differences in results for transcendental functions. In addition, future versions of CURAND may use newer versions of the CUDA math library, so different versions of CURAND may give slightly different numerical values.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsn- - Number of floats to generatemean- - Mean of associated normal distributionstddev- - Standard deviation of associated normal distribution- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension, or is not a multiple of two for pseudorandom generators \n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerateLogNormal
@Cast("curandStatus_t") public static int curandGenerateLogNormal(curandGenerator_st generator, FloatBuffer outputPtr, @Cast("size_t") long n, float mean, float stddev)
-
curandGenerateLogNormal
@Cast("curandStatus_t") public static int curandGenerateLogNormal(curandGenerator_st generator, float[] outputPtr, @Cast("size_t") long n, float mean, float stddev)
-
curandGenerateLogNormalDouble
@Cast("curandStatus_t") public static int curandGenerateLogNormalDouble(curandGenerator_st generator, DoublePointer outputPtr, @Cast("size_t") long n, double mean, double stddev)
\brief Generate log-normally distributed doubles. Use \p generator to generate \p n double results into the device memory at \p outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 64-bit floating point values with log-normal distribution based on an associated normal distribution with mean \p mean and standard deviation \p stddev. Normally distributed results are generated from pseudorandom generators with a Box-Muller transform, and so require \p n to be even. Quasirandom generators use an inverse cumulative distribution function to preserve dimensionality. The normally distributed results are transformed into log-normal distribution. There may be slight numerical differences between results generated on the GPU with generators created with ::curandCreateGenerator() and results calculated on the CPU with generators created with ::curandCreateGeneratorHost(). These differences arise because of differences in results for transcendental functions. In addition, future versions of CURAND may use newer versions of the CUDA math library, so different versions of CURAND may give slightly different numerical values.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsn- - Number of doubles to generatemean- - Mean of normal distributionstddev- - Standard deviation of normal distribution- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension, or is not a multiple of two for pseudorandom generators \n - CURAND_STATUS_DOUBLE_PRECISION_REQUIRED if the GPU does not support double precision \n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGenerateLogNormalDouble
@Cast("curandStatus_t") public static int curandGenerateLogNormalDouble(curandGenerator_st generator, DoubleBuffer outputPtr, @Cast("size_t") long n, double mean, double stddev)
-
curandGenerateLogNormalDouble
@Cast("curandStatus_t") public static int curandGenerateLogNormalDouble(curandGenerator_st generator, double[] outputPtr, @Cast("size_t") long n, double mean, double stddev)
-
curandCreatePoissonDistribution
@Cast("curandStatus_t") public static int curandCreatePoissonDistribution(double lambda, @ByPtrPtr curandDiscreteDistribution_st discrete_distribution)
\brief Construct the histogram array for a Poisson distribution. Construct the histogram array for the Poisson distribution with lambda \p lambda. For lambda greater than 2000, an approximation with a normal distribution is used.- Parameters:
lambda- - lambda for the Poisson distributiondiscrete_distribution- - pointer to the histogram in device memory- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_DOUBLE_PRECISION_REQUIRED if the GPU does not support double precision \n - CURAND_STATUS_INITIALIZATION_FAILED if there was a problem setting up the GPU \n - CURAND_STATUS_NOT_INITIALIZED if the distribution pointer was null \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_OUT_OF_RANGE if lambda is non-positive or greater than 400,000 \n - CURAND_STATUS_SUCCESS if the histogram was generated successfully \n
-
curandDestroyDistribution
@Cast("curandStatus_t") public static int curandDestroyDistribution(curandDiscreteDistribution_st discrete_distribution)
\brief Destroy the histogram array for a discrete distribution (e.g. Poisson). Destroy the histogram array for a discrete distribution created by curandCreatePoissonDistribution.- Parameters:
discrete_distribution- - pointer to device memory where the histogram is stored- Returns:
- - CURAND_STATUS_NOT_INITIALIZED if the histogram was never created \n - CURAND_STATUS_SUCCESS if the histogram was destroyed successfully \n
-
curandGeneratePoisson
@Cast("curandStatus_t") public static int curandGeneratePoisson(curandGenerator_st generator, @Cast("unsigned int*") IntPointer outputPtr, @Cast("size_t") long n, double lambda)
\brief Generate Poisson-distributed unsigned ints. Use \p generator to generate \p n unsigned int results into device memory at \p outputPtr. The device memory must have been previously allocated and must be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream if no stream has been set. Results are 32-bit unsigned int point values with Poisson distribution, with lambda \p lambda.- Parameters:
generator- - Generator to useoutputPtr- - Pointer to device memory to store CUDA-generated results, or Pointer to host memory to store CPU-generated resultsn- - Number of unsigned ints to generatelambda- - lambda for the Poisson distribution- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_LENGTH_NOT_MULTIPLE if the number of output samples is not a multiple of the quasirandom dimension\n - CURAND_STATUS_DOUBLE_PRECISION_REQUIRED if the GPU or sm does not support double precision \n - CURAND_STATUS_OUT_OF_RANGE if lambda is non-positive or greater than 400,000 \n - CURAND_STATUS_SUCCESS if the results were generated successfully \n
-
curandGeneratePoisson
@Cast("curandStatus_t") public static int curandGeneratePoisson(curandGenerator_st generator, @Cast("unsigned int*") IntBuffer outputPtr, @Cast("size_t") long n, double lambda)
-
curandGeneratePoisson
@Cast("curandStatus_t") public static int curandGeneratePoisson(curandGenerator_st generator, @Cast("unsigned int*") int[] outputPtr, @Cast("size_t") long n, double lambda)
-
curandGeneratePoissonMethod
@Cast("curandStatus_t") public static int curandGeneratePoissonMethod(curandGenerator_st generator, @Cast("unsigned int*") IntPointer outputPtr, @Cast("size_t") long n, double lambda, @Cast("curandMethod_t") int method)
-
curandGeneratePoissonMethod
@Cast("curandStatus_t") public static int curandGeneratePoissonMethod(curandGenerator_st generator, @Cast("unsigned int*") IntBuffer outputPtr, @Cast("size_t") long n, double lambda, @Cast("curandMethod_t") int method)
-
curandGeneratePoissonMethod
@Cast("curandStatus_t") public static int curandGeneratePoissonMethod(curandGenerator_st generator, @Cast("unsigned int*") int[] outputPtr, @Cast("size_t") long n, double lambda, @Cast("curandMethod_t") int method)
-
curandGenerateSeeds
@Cast("curandStatus_t") public static int curandGenerateSeeds(curandGenerator_st generator)
\brief Setup starting states. Generate the starting state of the generator. This function is automatically called by generation functions such as ::curandGenerate() and ::curandGenerateUniform(). It can be called manually for performance testing reasons to separate timings for starting state generation and random number generation.- Parameters:
generator- - Generator to update- Returns:
- - CURAND_STATUS_ALLOCATION_FAILED if memory could not be allocated \n - CURAND_STATUS_NOT_INITIALIZED if the generator was never created \n - CURAND_STATUS_PREEXISTING_FAILURE if there was an existing error from a previous kernel launch \n - CURAND_STATUS_LAUNCH_FAILURE if the kernel launch failed for any reason \n - CURAND_STATUS_SUCCESS if the seeds were generated successfully \n
-
curandGetDirectionVectors32
@Cast("curandStatus_t") public static int curandGetDirectionVectors32(@Cast("curandDirectionVectors32_t**") PointerPointer vectors, @Cast("curandDirectionVectorSet_t") int set)
\brief Get direction vectors for 32-bit quasirandom number generation. Get a pointer to an array of direction vectors that can be used for quasirandom number generation. The resulting pointer will reference an array of direction vectors in host memory. The array contains vectors for many dimensions. Each dimension has 32 vectors. Each individual vector is an unsigned int. Legal values for \p set are: - CURAND_DIRECTION_VECTORS_32_JOEKUO6 (20,000 dimensions) - CURAND_SCRAMBLED_DIRECTION_VECTORS_32_JOEKUO6 (20,000 dimensions)- Parameters:
vectors- - Address of pointer in which to return direction vectorsset- - Which set of direction vectors to use- Returns:
- - CURAND_STATUS_OUT_OF_RANGE if the choice of set is invalid \n - CURAND_STATUS_SUCCESS if the pointer was set successfully \n
-
curandGetDirectionVectors32
@Cast("curandStatus_t") public static int curandGetDirectionVectors32(@Cast("curandDirectionVectors32_t**") @ByPtrPtr IntPointer vectors, @Cast("curandDirectionVectorSet_t") int set)
-
curandGetDirectionVectors32
@Cast("curandStatus_t") public static int curandGetDirectionVectors32(@Cast("curandDirectionVectors32_t**") @ByPtrPtr IntBuffer vectors, @Cast("curandDirectionVectorSet_t") int set)
-
curandGetDirectionVectors32
@Cast("curandStatus_t") public static int curandGetDirectionVectors32(@Cast("curandDirectionVectors32_t**") @ByPtrPtr int[] vectors, @Cast("curandDirectionVectorSet_t") int set)
-
curandGetScrambleConstants32
@Cast("curandStatus_t") public static int curandGetScrambleConstants32(@Cast("unsigned int**") PointerPointer constants)
\brief Get scramble constants for 32-bit scrambled Sobol' . Get a pointer to an array of scramble constants that can be used for quasirandom number generation. The resulting pointer will reference an array of unsinged ints in host memory. The array contains constants for many dimensions. Each dimension has a single unsigned int constant.- Parameters:
constants- - Address of pointer in which to return scramble constants- Returns:
- - CURAND_STATUS_SUCCESS if the pointer was set successfully \n
-
curandGetScrambleConstants32
@Cast("curandStatus_t") public static int curandGetScrambleConstants32(@Cast("unsigned int**") @ByPtrPtr IntPointer constants)
-
curandGetScrambleConstants32
@Cast("curandStatus_t") public static int curandGetScrambleConstants32(@Cast("unsigned int**") @ByPtrPtr IntBuffer constants)
-
curandGetScrambleConstants32
@Cast("curandStatus_t") public static int curandGetScrambleConstants32(@Cast("unsigned int**") @ByPtrPtr int[] constants)
-
curandGetDirectionVectors64
@Cast("curandStatus_t") public static int curandGetDirectionVectors64(@Cast("curandDirectionVectors64_t**") PointerPointer vectors, @Cast("curandDirectionVectorSet_t") int set)
\brief Get direction vectors for 64-bit quasirandom number generation. Get a pointer to an array of direction vectors that can be used for quasirandom number generation. The resulting pointer will reference an array of direction vectors in host memory. The array contains vectors for many dimensions. Each dimension has 64 vectors. Each individual vector is an unsigned long long. Legal values for \p set are: - CURAND_DIRECTION_VECTORS_64_JOEKUO6 (20,000 dimensions) - CURAND_SCRAMBLED_DIRECTION_VECTORS_64_JOEKUO6 (20,000 dimensions)- Parameters:
vectors- - Address of pointer in which to return direction vectorsset- - Which set of direction vectors to use- Returns:
- - CURAND_STATUS_OUT_OF_RANGE if the choice of set is invalid \n - CURAND_STATUS_SUCCESS if the pointer was set successfully \n
-
curandGetDirectionVectors64
@Cast("curandStatus_t") public static int curandGetDirectionVectors64(@Cast("curandDirectionVectors64_t**") @ByPtrPtr LongPointer vectors, @Cast("curandDirectionVectorSet_t") int set)
-
curandGetDirectionVectors64
@Cast("curandStatus_t") public static int curandGetDirectionVectors64(@Cast("curandDirectionVectors64_t**") @ByPtrPtr LongBuffer vectors, @Cast("curandDirectionVectorSet_t") int set)
-
curandGetDirectionVectors64
@Cast("curandStatus_t") public static int curandGetDirectionVectors64(@Cast("curandDirectionVectors64_t**") @ByPtrPtr long[] vectors, @Cast("curandDirectionVectorSet_t") int set)
-
curandGetScrambleConstants64
@Cast("curandStatus_t") public static int curandGetScrambleConstants64(@Cast("unsigned long long**") PointerPointer constants)
\brief Get scramble constants for 64-bit scrambled Sobol' . Get a pointer to an array of scramble constants that can be used for quasirandom number generation. The resulting pointer will reference an array of unsinged long longs in host memory. The array contains constants for many dimensions. Each dimension has a single unsigned long long constant.- Parameters:
constants- - Address of pointer in which to return scramble constants- Returns:
- - CURAND_STATUS_SUCCESS if the pointer was set successfully \n
-
curandGetScrambleConstants64
@Cast("curandStatus_t") public static int curandGetScrambleConstants64(@Cast("unsigned long long**") @ByPtrPtr LongPointer constants)
-
curandGetScrambleConstants64
@Cast("curandStatus_t") public static int curandGetScrambleConstants64(@Cast("unsigned long long**") @ByPtrPtr LongBuffer constants)
-
-