Adelsbach/VSIPL
Core Lite Programming Reference Guide
DD-00014-015
Core Lite

13.3 vsip_vrandu_p - Generate Uniformly Distributed Random Numbers in a Vector View

void vsip_vrandu_f(vsip_randstate *state, const vsip_vview_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);