QuIDS: Quantum Irregular Dynamic Simulator
Data Structures | Functions | Variables
quids::utils Namespace Reference

QuIDS utility function and variable namespace. More...

Data Structures

class  fast_vector
 drop-in replacement for vectors, with more "efficient" memory usage and access. More...
 
class  random_generator
 simple random generator More...
 

Functions

int nearest_power_of_two (int n)
 returns the upper bound as a power of two
 
int log_2_upper_bound (int n)
 returns the upperbound bound of the log2
 
template<class iteratorType , class valueType >
void parallel_iota (iteratorType begin, iteratorType end, const valueType value_begin)
 parallel iota
 
template<class idIteratorType , class countIteratorType , class functionType >
void generalized_partition (idIteratorType idx_in, idIteratorType idx_in_end, idIteratorType idx_buffer, countIteratorType offset, countIteratorType offset_end, functionType const partitioner)
 linear partitioning algorithm into n partitions
 
template<class idIteratorType , class countIteratorType , class functionType >
void generalized_partition_from_iota (idIteratorType idx_in, idIteratorType idx_in_end, long long int const iotaOffset, countIteratorType offset, countIteratorType offset_end, functionType const partitioner)
 linear partitioning algorithm into n partitions without an initialized index list
 
template<class idIteratorType , class countIteratorType , class functionType >
void parallel_generalized_partition (idIteratorType idx_in, idIteratorType idx_in_end, idIteratorType idx_buffer, countIteratorType offset, countIteratorType offset_end, functionType const partitioner)
 linear partitioning algorithm into n partitions in parallel
 
template<class idIteratorType , class countIteratorType , class functionType >
void parallel_generalized_partition_from_iota (idIteratorType idx_in, idIteratorType idx_in_end, long long int const iotaOffset, countIteratorType offset, countIteratorType offset_end, functionType const partitioner)
 linear partitioning algorithm into n partitions without an initialized index list in parallel
 
template<class UnsignedIntIterator1 , class UnsignedIntIterator2 >
void load_balancing_from_prefix_sum (const UnsignedIntIterator1 prefixSumLoadBegin, const UnsignedIntIterator1 prefixSumLoadEnd, UnsignedIntIterator2 workSharingIndexesBegin, UnsignedIntIterator2 workSharingIndexesEnd)
 simple CCP load balacing implementation.
 
size_t get_free_mem ()
 function that get the total amount of available free memory.
 

Variables

float upsize_policy = UPSIZE_POLICY
 size multiplicator when upsizing, to avoid repeated upsizing.
 
float downsize_policy = DOWNSIZE_POLICY
 size multiplicator when downsize_policy, to avoid repeated upsizing. !!! upsize_policy*downsize_policy < 1 to avoid repeated resizing.
 
size_t min_vector_size = MIN_VECTOR_SIZE
 minimum size a vector is allocated to (to avoid resizing at small sizes).
 

Detailed Description

QuIDS utility function and variable namespace.