Adelsbach/VSIPL
Core Programming Reference Guide
DD-00016-015
Core

This manual is preliminary and incomplete.
While our Core implementation implements all functions given in the standard we are still working on completing this documentation.

Please refer to the VSIPL standard for a complete function reference of the Core profile until we have completed work on this documentation.

3.1.3 vsip_dvrandu_p - Generate Uniformly Distributed Random Numbers in a Vector View

void vsip_vrandu_f(vsip_randstate *state, const vsip_vview_f *r); 
void vsip_cvrandu_f(vsip_randstate *state, const vsip_cvview_f *r);
Description

This function fills the vector view r with uniformly distributed random numbers in the range [0, 1) using the random number generator state state.

Parameters
Example

vsip_randstate *rand_state; 
vsip_vview_f *random_vector; 
 
// Initialize random number generator state 
rand_state = vsip_randcreate(42, 0, 1, VSIP_PRNG); 
 
// Assuming random_vector has been properly initialized 
vsip_vrandu_f(rand_state, random_vector); 
 
// Clean up 
vsip_randdestroy(rand_state);