update
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -22,6 +22,7 @@ namespace amscuda
|
||||
__host__ __device__ cuvect2 operator-(cuvect2 lhs);
|
||||
__host__ __device__ cuvect2 operator*(double lhs);
|
||||
__host__ __device__ cuvect2 operator/(double lhs);
|
||||
__host__ __device__ friend cuvect2 operator-(cuvect2 rhs);
|
||||
};
|
||||
|
||||
class cumat2
|
||||
|
||||
@ -23,6 +23,7 @@ namespace amscuda
|
||||
__host__ __device__ cuvect3 operator-(cuvect3 lhs);
|
||||
__host__ __device__ cuvect3 operator*(double lhs);
|
||||
__host__ __device__ cuvect3 operator/(double lhs);
|
||||
__host__ __device__ friend cuvect3 operator-(cuvect3 rhs);
|
||||
};
|
||||
|
||||
class cumat3
|
||||
|
||||
@ -23,6 +23,7 @@ namespace amscuda
|
||||
__host__ __device__ cuvect4 operator-(cuvect4 lhs);
|
||||
__host__ __device__ cuvect4 operator*(double lhs);
|
||||
__host__ __device__ cuvect4 operator/(double lhs);
|
||||
__host__ __device__ friend cuvect4 operator-(cuvect4 rhs);
|
||||
};
|
||||
|
||||
class cumat4
|
||||
|
||||
@ -351,6 +351,14 @@ __host__ __device__ cuvect2 mat2_mult(double *mat2a, cuvect2 b)
|
||||
return ret;
|
||||
}
|
||||
|
||||
__host__ __device__ cuvect2 operator-(cuvect2 rhs)
|
||||
{
|
||||
cuvect2 ret;
|
||||
ret[0] = -rhs[0];
|
||||
ret[1] = -rhs[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
void test_cuvect2_1()
|
||||
{
|
||||
|
||||
|
||||
@ -578,4 +578,15 @@ __host__ __device__ cumat3 cumat3::inverse()
|
||||
return q;
|
||||
}
|
||||
|
||||
__host__ __device__ cuvect3 operator-(cuvect3 rhs)
|
||||
{
|
||||
cuvect3 ret;
|
||||
ret[0] = -rhs[0];
|
||||
ret[1] = -rhs[1];
|
||||
ret[2] = -rhs[2];
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
@ -410,5 +410,15 @@ __host__ __device__ cuvect4 cuvect4_proj(cuvect4 a, cuvect4 b)
|
||||
return ret;
|
||||
}
|
||||
|
||||
__host__ __device__ cuvect4 operator-(cuvect4 rhs)
|
||||
{
|
||||
cuvect4 ret;
|
||||
ret[0] = -rhs[0];
|
||||
ret[1] = -rhs[1];
|
||||
ret[2] = -rhs[2];
|
||||
ret[3] = -rhs[3];
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user