MemoryBandwidth/MemoryBandwidth.c
uint64_t GetIterationCount(uint64_t testSize, uint64_t threads)
{
    if (testSize > 64) gbToTransfer = 64;
    if (testSize > 512) gbToTransfer = 64;
    if (testSize > 8192) gbToTransfer = 64;
    uint64_t iterations = gbToTransfer * 1024 * 1024 / testSize;
    if (iterations % 2 != 0) iterations += 1;  // must be even

    if (iterations < 8) return 8; // set a minimum to reduce noise
    else return iterations;
}
/// <summary>
/// Given test size in KB, return a good iteration count
/// </summary>
/// <param name="testSize">test size in KB</param>
/// <returns>Iterations per thread</returns>


Given test size in KB, return a good iteration count

test size in KB
Iterations per thread
Given test size in KB return a good iteration count test size in KB Iterations per thread
uint64_t GetIterationCount(uint64_t testSize, uint64_t threads)
{
    if (testSize > 64) gbToTransfer = 64;
    if (testSize > 512) gbToTransfer = 64;
    if (testSize > 8192) gbToTransfer = 64;
    uint64_t iterations = gbToTransfer * 1024 * 1024 / testSize;
    if (iterations % 2 != 0) iterations += 1;  
    if (iterations < 8) return 8; 
    else return iterations;
}
uint64_t GetIterationCount ( uint64_t testSize , uint64_t threads ) { if ( testSize > 64 ) gbToTransfer = 64 ; if ( testSize > 512 ) gbToTransfer = 64 ; if ( testSize > 8192 ) gbToTransfer = 64 ; uint64_t iterations = gbToTransfer * 1024 * 1024 / testSize ; if ( iterations % 2 != 0 ) iterations += 1 ; if ( iterations < 8 ) return 8 ; else return iterations ; }
<summary>
Given test size in KB, return a good iteration count
</summary>
<param name="testSize">test size in KB</param>
<returns>Iterations per thread</returns>
<summary > Given test size in KB return a good iteration count < / summary > <param name = " testSize " > test size in KB< / param > <returns > Iterations per thread< / returns >
// must be even
 // set a minimum to reduce noise
