MADNESS 0.10.1
test_hashthreaded.cc File Reference
#include <madness/world/world.h>
#include <madness/world/thread.h>
#include <madness/world/worldhash.h>
#include <madness/world/worldhashmap.h>
#include <madness/world/range.h>
#include <madness/world/timers.h>
#include <madness/world/atomicint.h>
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <algorithm>
Include dependency graph for test_hashthreaded.cc:

Classes

class  Peasant
class  Worker

Functions

void do_test_random (ConcurrentHashMap< int, double > &a, size_t &count, double &sum)
double drand ()
void errmsg (const char *msg, int status)
int main (int argc, char **argv)
vector< int > random_perm (int n)
void split (const Range< ConcurrentHashMap< int, int >::iterator > &range)
void test_accessors ()
void test_coverage ()
void test_random ()
void test_thread ()
void test_time ()

Variables

madness::AtomicInt ndone
bool smalltest = false

Function Documentation

◆ do_test_random()

void do_test_random ( ConcurrentHashMap< int, double > & a,
size_t & count,
double & sum )

References a, drand(), madness::Future< void >::value, and sum.

Referenced by Worker::run(), and test_random().

◆ drand()

double drand ( )

Referenced by do_test_random(), and random_perm().

◆ errmsg()

◆ main()

◆ random_perm()

vector< int > random_perm ( int n)

References drand(), madness::swap(), and v.

Referenced by test_time().

◆ split()

◆ test_accessors()

void test_accessors ( )

References a, a1, a2, MADNESS_EXCEPTION, and ndone.

Referenced by main().

◆ test_coverage()

◆ test_random()

void test_random ( )

References a, do_test_random(), and sum.

Referenced by main().

◆ test_thread()

void test_thread ( )

References a, ndone, and sum.

Referenced by main().

◆ test_time()

void test_time ( )

References a, madness::cpu_time(), MADNESS_ASSERT, random_perm(), and v.

Referenced by main().

Variable Documentation

◆ ndone

Referenced by Peasant::run(), and Worker::run().

◆ smalltest

bool smalltest = false