Graph Framework
Loading...
Searching...
No Matches
random_test.cpp File Reference

Tests for random nodes. More...

Functions

template<jit::float_scalar T>
T autocorrelation (const std::vector< T > &sequence, const size_t offset)
 Compute the auto correlation for a specific offset.
template<jit::float_scalar T, size_t N>
void test_dist ()
 Run test with a specified backend.
template<jit::float_scalar T>
void test_graph ()
 Test graph properties of random numbers.
template<jit::float_scalar T>
void test_multi ()
 Test multiple randoms in a single kernel.
template<jit::float_scalar T, size_t N>
void run_tests ()
 Run tests.
int main (int argc, const char *argv[])
 Main program of the test.

Detailed Description

Tests for random nodes.

Function Documentation

◆ autocorrelation()

template<jit::float_scalar T>
T autocorrelation ( const std::vector< T > & sequence,
const size_t offset )

Compute the auto correlation for a specific offset.

Template Parameters
TBase type.
Parameters
[in]sequenceRandom sequence.
[in]offsetOffset of the correlation.
Returns
The autocorrelation for a given offset.

◆ main()

int main ( int argc,
const char * argv[] )

Main program of the test.

Parameters
[in]argcNumber of commandline arguments.
[in]argvArray of commandline arguments.

◆ run_tests()

template<jit::float_scalar T, size_t N>
void run_tests ( )

Run tests.

Template Parameters
TBase type of the calculation.
NNumber of random numbers to use.

◆ test_dist()

template<jit::float_scalar T, size_t N>
void test_dist ( )

Run test with a specified backend.

Template Parameters
TBase type of the calculation.
NNumber of random numbers to use.