Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit negation of const vectors #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Common/helper_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,27 +263,27 @@ inline __host__ __device__ uint4 make_uint4(int4 a)
// negate
////////////////////////////////////////////////////////////////////////////////

inline __host__ __device__ float2 operator-(float2 &a)
inline __host__ __device__ float2 operator-(float2 a)
{
return make_float2(-a.x, -a.y);
}
inline __host__ __device__ int2 operator-(int2 &a)
inline __host__ __device__ int2 operator-(int2 a)
{
return make_int2(-a.x, -a.y);
}
inline __host__ __device__ float3 operator-(float3 &a)
inline __host__ __device__ float3 operator-(float3 a)
{
return make_float3(-a.x, -a.y, -a.z);
}
inline __host__ __device__ int3 operator-(int3 &a)
inline __host__ __device__ int3 operator-(int3 a)
{
return make_int3(-a.x, -a.y, -a.z);
}
inline __host__ __device__ float4 operator-(float4 &a)
inline __host__ __device__ float4 operator-(float4 a)
{
return make_float4(-a.x, -a.y, -a.z, -a.w);
}
inline __host__ __device__ int4 operator-(int4 &a)
inline __host__ __device__ int4 operator-(int4 a)
{
return make_int4(-a.x, -a.y, -a.z, -a.w);
}
Expand Down