2 * Copyright 1993-2013 NVIDIA Corporation. All rights reserved.
\r
4 * Please refer to the NVIDIA end user license agreement (EULA) associated
\r
5 * with this source code for terms and conditions that govern your use of
\r
6 * this software. Any use, reproduction, disclosure, or distribution of
\r
7 * this software and related documentation outside the terms of the EULA
\r
8 * is strictly prohibited.
\r
12 ////////////////////////////////////////////////////////////////////////////////
\r
13 // export C interface
\r
15 void computeGold(float *reference, float *idata, const unsigned int len);
\r
17 ////////////////////////////////////////////////////////////////////////////////
\r
18 //! Compute reference data set
\r
19 //! Each element is multiplied with the number of threads / array length
\r
20 //! @param reference reference data, computed but preallocated
\r
21 //! @param idata input data as provided to device
\r
22 //! @param len number of elements in reference / idata
\r
23 ////////////////////////////////////////////////////////////////////////////////
\r
25 computeGold(float *reference, float *idata, const unsigned int len)
\r
27 const float f_len = static_cast<float>(len);
\r
29 for (unsigned int i = 0; i < len; ++i)
\r
31 reference[i] = idata[i] * f_len;
\r