|
HOPS
HOPS class reference
|
bit reversal permutation function for power-of-two FFTs More...
#include <MHO_BitReversalPermutation.hh>
Public Member Functions | |
| MHO_BitReversalPermutation () | |
| virtual | ~MHO_BitReversalPermutation () |
Static Public Member Functions | |
| static void | ComputeBitReversedIndicesBaseTwo (unsigned int N, unsigned int *index_arr) |
| Computes bit-reversed indices using Buneman algorithm for input N, must have N = 2^P, with P an integer. More... | |
| static bool | IsPowerOfBase (unsigned int N, unsigned int B) |
| Checks if an unsigned integer N is a perfect power of another unsigned integer B. More... | |
| static bool | IsPowerOfTwo (unsigned int N) |
| Checks if an unsigned integer is a power of two. More... | |
| static unsigned int | LogBaseB (unsigned int N, unsigned int B) |
| Calculates the logarithm base B of N, assuming N is a perfect power of B. More... | |
| static unsigned int | LogBaseTwo (unsigned int N) |
| Calculates the logarithm base two of an unsigned integer N using bitwise operations. More... | |
| static unsigned int | NextLowestPowerOfTwo (unsigned int N) |
| Calculates the next lowest power of two for a given unsigned integer. More... | |
| template<typename DataType > | |
| static void | PermuteArray (unsigned int N, const unsigned int *permutation_index_arr, DataType *arr) |
| Permutes an array using a given permutation index array (non-strided data access pattern). More... | |
| template<typename DataType > | |
| static void | PermuteArray (unsigned int N, const unsigned int *permutation_index_arr, DataType *arr, unsigned int stride) |
| Permutes a DataType array using an index permutation (strided data access version) More... | |
| template<typename DataType > | |
| static void | PermuteArrayBranchFree (unsigned int N, const unsigned int *permutation_index_arr, DataType *arr) |
| Function PermuteArrayBranchFree non-strided data access pattern branch free (this is actually slower on CPU, but we preserve it here for comparison as this method is used on GPU) More... | |
| template<typename DataType > | |
| static void | PermuteArrayBranchFree (unsigned int N, const unsigned int *permutation_index_arr, DataType *arr, unsigned int stride) |
| Function PermuteArrayBranchFree strided data access version branch free (this is actually slower on CPU, but we preserve it here for comparison as this method is used on GPU) More... | |
| static unsigned int | RaiseBaseToThePower (unsigned int B, unsigned int N) |
| Calculates B raised to the power N. More... | |
| static unsigned int | ReverseIndexBits (unsigned int nbits, unsigned int x) |
| Reverses the bit indices of a given unsigned integer. More... | |
| static unsigned int | TwoToThePowerOf (unsigned int N) |
| Calculates 2 raised to the power of N using bit shifting. More... | |
bit reversal permutation function for power-of-two FFTs
|
inline |
|
inlinevirtual |
|
static |
Computes bit-reversed indices using Buneman algorithm for input N, must have N = 2^P, with P an integer.
| N | Input size, must be a power of two |
| index_arr | Output array to store permutated indices |
|
static |
Checks if an unsigned integer N is a perfect power of another unsigned integer B.
| N | Input number to check for being a perfect power |
| B | Base number against which N is checked |
|
static |
Checks if an unsigned integer is a power of two.
| N | Input unsigned integer to check. |
|
static |
Calculates the logarithm base B of N, assuming N is a perfect power of B.
| N | Input number for which to calculate the logarithm |
| B | Base of the logarithm |
|
static |
Calculates the logarithm base two of an unsigned integer N using bitwise operations.
| N | Input unsigned integer for which to calculate the logarithm base two. |
|
static |
Calculates the next lowest power of two for a given unsigned integer.
| N | Input unsigned integer. |
|
inlinestatic |
Permutes an array using a given permutation index array (non-strided data access pattern).
| DataType | Template parameter DataType |
| N | Size of the array and permutation index array. |
| permutation_index_arr | Array containing permutation indices. |
| arr | (DataType*) |
|
inlinestatic |
Permutes a DataType array using an index permutation (strided data access version)
| DataType | Template parameter DataType |
| N | Size of the array and permutation index array. |
| permutation_index_arr | Array containing the permutation indices. |
| arr | DataType array to be permuted. |
| stride | (unsigned int), memory stride between adjacent elements in the array |
|
inlinestatic |
Function PermuteArrayBranchFree non-strided data access pattern branch free (this is actually slower on CPU, but we preserve it here for comparison as this method is used on GPU)
| DataType | Template parameter DataType |
| N | (unsigned int) |
| permutation_index_arr | (const unsigned int*) |
| arr | (DataType*) |
|
inlinestatic |
Function PermuteArrayBranchFree strided data access version branch free (this is actually slower on CPU, but we preserve it here for comparison as this method is used on GPU)
| DataType | Template parameter DataType |
| N | (unsigned int) |
| permutation_index_arr | (const unsigned int*) |
| arr | (DataType*) |
| stride | (unsigned int), memory stride between adjacent elements in the array |
|
static |
Calculates B raised to the power N.
| B | Base number to be raised |
| N | Power to which base is raised (N must be >= 0) |
|
static |
Reverses the bit indices of a given unsigned integer.
| nbits | Number of bits to consider for reversal. |
| x | Input unsigned integer whose bit indices are to be reversed. |
|
static |
Calculates 2 raised to the power of N using bit shifting.
| N | Input exponent for the calculation (N must be >= 0 and <=31) |