tests/cuda4.1sdk/tests/cppIntegration/cppIntegration_gold.cpp
void
computeGold(char* reference, char* idata, const unsigned int len)
{
    for(unsigned int i = 0; i < len; ++i)
        reference[i] = idata[i] - 10;
}
////////////////////////////////////////////////////////////////////////////////
//! Compute reference data set
//! Each element is multiplied with the number of threads / array length
//! @param reference  reference data, computed but preallocated
//! @param idata      input data as provided to device
//! @param len        number of elements in reference / idata
////////////////////////////////////////////////////////////////////////////////
Compute reference data set
Each element is multiplied with the number of threads / array length
Compute reference data set Each element is multiplied with the number of threads / array length
void
computeGold(char* reference, char* idata, const unsigned int len)
{
    for(unsigned int i = 0; i < len; ++i)
        reference[i] = idata[i] - 10;
}
void computeGold ( char * reference , char * idata , const unsigned int len ) { for ( unsigned int i = 0 ; i < len ; ++ i ) reference [ i ] = idata [ i ] - 10 ; }
Compute reference data set
Each element is multiplied with the number of threads / array length
Compute reference data set Each element is multiplied with the number of threads / array length