Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_rand.h
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
| /** Allows up to BLENDER_MAX_THREADS threads to address */ | /** Allows up to BLENDER_MAX_THREADS threads to address */ | ||||
| float BLI_thread_frand(int thread) ATTR_WARN_UNUSED_RESULT; | float BLI_thread_frand(int thread) ATTR_WARN_UNUSED_RESULT; | ||||
| /** array versions for thread safe random generation */ | /** array versions for thread safe random generation */ | ||||
| RNG_THREAD_ARRAY *BLI_rng_threaded_new(void); | RNG_THREAD_ARRAY *BLI_rng_threaded_new(void); | ||||
| void BLI_rng_threaded_free(struct RNG_THREAD_ARRAY *rngarr) ATTR_NONNULL(1); | void BLI_rng_threaded_free(struct RNG_THREAD_ARRAY *rngarr) ATTR_NONNULL(1); | ||||
| int BLI_rng_thread_rand(RNG_THREAD_ARRAY *rngarr, int thread) ATTR_WARN_UNUSED_RESULT; | int BLI_rng_thread_rand(RNG_THREAD_ARRAY *rngarr, int thread) ATTR_WARN_UNUSED_RESULT; | ||||
| /** Low-discrepancy sequences **/ | /* Low-discrepancy sequences. */ | ||||
| /** Return the _n_th number of the given low-discrepancy sequence. */ | /** Return the _n_th number of the given low-discrepancy sequence. */ | ||||
| void BLI_halton_1D(unsigned int prime, double offset, int n, double *r); | void BLI_halton_1D(unsigned int prime, double offset, int n, double *r); | ||||
| void BLI_halton_2D(unsigned int prime[2], double offset[2], int n, double *r); | void BLI_halton_2D(unsigned int prime[2], double offset[2], int n, double *r); | ||||
| void BLI_halton_3D(unsigned int prime[3], double offset[3], int n, double *r); | void BLI_halton_3D(unsigned int prime[3], double offset[3], int n, double *r); | ||||
| void BLI_hammersley_1D(unsigned int n, double *r); | void BLI_hammersley_1D(unsigned int n, double *r); | ||||
| /** Return the whole low-discrepancy sequence up to _n_. */ | /** Return the whole low-discrepancy sequence up to _n_. */ | ||||
| void BLI_halton_2D_sequence(unsigned int prime[2], double offset[2], int n, double *r); | void BLI_halton_2D_sequence(unsigned int prime[2], double offset[2], int n, double *r); | ||||
| void BLI_hammersley_2D_sequence(unsigned int n, double *r); | void BLI_hammersley_2D_sequence(unsigned int n, double *r); | ||||
| #endif /* __BLI_RAND_H__ */ | #endif /* __BLI_RAND_H__ */ | ||||