tests/cuda4.1sdk/tests/cppIntegration/cppIntegration_gold.cpp
void
computeGold2(int2* reference, int2* idata, const unsigned int len)
{
    for(unsigned int i = 0; i < len; ++i)
    {
        reference[i].x = idata[i].x - idata[i].y;
        reference[i].y = idata[i].y;
    }
}
////////////////////////////////////////////////////////////////////////////////
//! Compute reference data set for int2 version
//! 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 for int2 version
Each element is multiplied with the number of threads / array length
Compute reference data set for int2 version Each element is multiplied with the number of threads / array length
void
computeGold2(int2* reference, int2* idata, const unsigned int len)
{
    for(unsigned int i = 0; i < len; ++i)
    {
        reference[i].x = idata[i].x - idata[i].y;
        reference[i].y = idata[i].y;
    }
}
void computeGold2 ( int2 * reference , int2 * idata , const unsigned int len ) { for ( unsigned int i = 0 ; i < len ; ++ i ) { reference [ i ] . x = idata [ i ] . x - idata [ i ] . y ; reference [ i ] . y = idata [ i ] . y ; } }
Compute reference data set for int2 version
Each element is multiplied with the number of threads / array length
Compute reference data set for int2 version Each element is multiplied with the number of threads / array length