diff options
Diffstat (limited to 'linalg.h')
-rw-r--r-- | linalg.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3,7 +3,7 @@ __device__ __host__ float3 operator+ (const float3 &a, const float3 &b) { - return make_float3(a.x+b.x, a.y+b.y, a.z+b.y); + return make_float3(a.x+b.x, a.y+b.y, a.z+b.z); } __device__ __host__ void operator+= (float3 &a, const float3 &b) @@ -30,7 +30,7 @@ __device__ __host__ float3 operator+ (const float3 &a, const float &c) return make_float3(a.x+c, a.y+c, a.z+c); } -__device__ __host__ float3 operator+= (const float3 &a, const float &c) +__device__ __host__ void operator+= (float3 &a, const float &c) { a.x += c; a.y += c; @@ -47,7 +47,7 @@ __device__ __host__ float3 operator- (const float3 &a, const float &c) return make_float3(a.x-c, a.y-c, a.z-c); } -__device__ __host__ float3 operator-= (const float3 &a, const float &c) +__device__ __host__ void operator-= (float3 &a, const float &c) { a.x -= c; a.y -= c; @@ -64,7 +64,7 @@ __device__ __host__ float3 operator* (const float3 &a, const float &c) return make_float3(a.x*c, a.y*c, a.z*c); } -__device__ __host__ float3 operator*= (const float3 &a, const float &c) +__device__ __host__ void operator*= (float3 &a, const float &c) { a.x *= c; a.y *= c; @@ -81,7 +81,7 @@ __device__ __host__ float3 operator/ (const float3 &a, const float &c) return make_float3(a.x/c, a.y/c, a.z/c); } -__device__ __host__ float3 operator/= (const float3 &a, const float &c) +__device__ __host__ void operator/= (float3 &a, const float &c) { a.x /= c; a.y /= c; |