From 11b308e7363e937966b035b4891db32b4eece3bf Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Fri, 1 Oct 2010 08:55:28 -0800 Subject: integrating recent changes from fermi-test into fermi (i'll use "fermi" for more disruptive changes to the pipeline model such as updating the MSHRs and getting rid of the warp tracker, ripping out DWF, etc...) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7805] --- benchmarks/CUDA/WP/util.h | 265 ---------------------------------------------- 1 file changed, 265 deletions(-) delete mode 100644 benchmarks/CUDA/WP/util.h (limited to 'benchmarks/CUDA/WP/util.h') diff --git a/benchmarks/CUDA/WP/util.h b/benchmarks/CUDA/WP/util.h deleted file mode 100644 index 56cb493..0000000 --- a/benchmarks/CUDA/WP/util.h +++ /dev/null @@ -1,265 +0,0 @@ - class Float4 { - public: - float x, y, z, w; - - __device__ const Float4 - operator+(const Float4& iv) const { - Float4 rv ; - rv.x = x + iv.x ; - rv.y = y + iv.y ; - rv.z = z + iv.z ; - rv.w = w + iv.w ; - return Float4( rv ) ; - } - __device__ const Float4 - operator*(const Float4& iv) const { - Float4 rv ; - rv.x = x * iv.x ; - rv.y = y * iv.y ; - rv.z = z * iv.z ; - rv.w = w * iv.w ; - return Float4( rv ) ; - } - __device__ const Float4 - operator/(const Float4& iv) const { - Float4 rv ; - rv.x = x / iv.x ; - rv.y = y / iv.y ; - rv.z = z / iv.z ; - rv.w = w / iv.w ; - return Float4( rv ) ; - } - __device__ const Float4 - operator-(const Float4& iv) const { - Float4 rv ; - rv.x = x - iv.x ; - rv.y = y - iv.y ; - rv.z = z - iv.z ; - rv.w = w - iv.w ; - return Float4( rv ) ; - } - - __device__ const Float4 - operator+(const float iv) const { - Float4 rv ; - rv.x = x + iv ; - rv.y = y + iv ; - rv.z = z + iv ; - rv.w = w + iv ; - return Float4( rv ) ; - } - __device__ const Float4 - operator*(const float iv) const { - Float4 rv ; - rv.x = x * iv ; - rv.y = y * iv ; - rv.z = z * iv ; - rv.w = w * iv ; - return Float4( rv ) ; - } - __device__ const Float4 - operator/(const float iv) const { - Float4 rv ; - rv.x = x / iv ; - rv.y = y / iv ; - rv.z = z / iv ; - rv.w = w / iv ; - return Float4( rv ) ; - } - __device__ const Float4 - operator-(const float iv) const { - Float4 rv ; - rv.x = x - iv ; - rv.y = y - iv ; - rv.z = z - iv ; - rv.w = w - iv ; - return Float4( rv ) ; - } - __device__ const Float4 - operator-() const { - Float4 rv ; - rv.x = -x ; - rv.y = -y ; - rv.z = -z ; - rv.w = -w ; - return Float4( rv ) ; - } - - __device__ void operator=(const float iv) { - x = iv ; - y = iv ; - z = iv ; - w = iv ; - } - - __device__ void operator+=(const Float4 iv) { - x += iv.x ; - y += iv.y ; - z += iv.z ; - w += iv.w ; - } - __device__ void operator-=(const Float4 iv) { - x -= iv.x ; - y -= iv.y ; - z -= iv.z ; - w -= iv.w ; - } - - }; - - __device__ const Float4 - operator+( const float iv1, const Float4 iv2 ) { - Float4 rv ; - rv.x = iv1 + iv2.x ; - rv.y = iv1 + iv2.y ; - rv.z = iv1 + iv2.z ; - rv.w = iv1 + iv2.w ; - return Float4( rv ) ; - } - __device__ const Float4 - operator*( const float iv1, const Float4 iv2 ) { - Float4 rv ; - rv.x = iv1 * iv2.x ; - rv.y = iv1 * iv2.y ; - rv.z = iv1 * iv2.z ; - rv.w = iv1 * iv2.w ; - return Float4( rv ) ; - } - __device__ const Float4 - operator/( const float iv1, const Float4 iv2 ) { - Float4 rv ; - rv.x = iv1 / iv2.x ; - rv.y = iv1 / iv2.y ; - rv.z = iv1 / iv2.z ; - rv.w = iv1 / iv2.w ; - return Float4( rv ) ; - } - __device__ const Float4 - operator-( const float iv1, const Float4 iv2 ) { - Float4 rv ; - rv.x = iv1 - iv2.x ; - rv.y = iv1 - iv2.y ; - rv.z = iv1 - iv2.z ; - rv.w = iv1 - iv2.w ; - return Float4( rv ) ; - } - -__device__ Float4 max ( const Float4 a , const Float4 b ) -{ - Float4 c ; - c.x = (a.x>b.x)?a.x:b.x; - c.y = (a.y>b.y)?a.y:b.y; - c.z = (a.z>b.z)?a.z:b.z; - c.w = (a.w>b.w)?a.w:b.w; - return(c) ; -} -__device__ Float4 max ( const float a , const Float4 b ) -{ - Float4 c ; - c.x = (a>b.x)?a:b.x; - c.y = (a>b.y)?a:b.y; - c.z = (a>b.z)?a:b.z; - c.w = (a>b.w)?a:b.w; - return(c) ; -} -__device__ Float4 max ( const Float4 a , const float b ) -{ - Float4 c ; - c.x = (a.x>b)?a.x:b; - c.y = (a.y>b)?a.y:b; - c.z = (a.z>b)?a.z:b; - c.w = (a.w>b)?a.w:b; - return(c) ; -} -//__device__ float max ( const float a , const float b ) -//{ -// return(a>b)?a:b) ; -//} - -__device__ Float4 min ( const Float4 a , const Float4 b ) -{ - Float4 c ; - c.x = (a.x