updated vector operators
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.
@ -42,6 +42,7 @@ namespace amscuda
|
|||||||
__host__ __device__ cumat2 operator/(double lhs);
|
__host__ __device__ cumat2 operator/(double lhs);
|
||||||
__host__ __device__ cuvect2 operator*(cuvect2 lhs);
|
__host__ __device__ cuvect2 operator*(cuvect2 lhs);
|
||||||
__host__ __device__ cumat2 operator*(cumat2 lhs);
|
__host__ __device__ cumat2 operator*(cumat2 lhs);
|
||||||
|
__host__ __device__ friend cumat2 operator-(cumat2 rhs);
|
||||||
|
|
||||||
__host__ __device__ double det();
|
__host__ __device__ double det();
|
||||||
__host__ __device__ cumat2 transpose();
|
__host__ __device__ cumat2 transpose();
|
||||||
|
|||||||
@ -42,6 +42,7 @@ namespace amscuda
|
|||||||
__host__ __device__ cumat2f operator/(float lhs);
|
__host__ __device__ cumat2f operator/(float lhs);
|
||||||
__host__ __device__ cuvect2f operator*(cuvect2f lhs);
|
__host__ __device__ cuvect2f operator*(cuvect2f lhs);
|
||||||
__host__ __device__ cumat2f operator*(cumat2f lhs);
|
__host__ __device__ cumat2f operator*(cumat2f lhs);
|
||||||
|
__host__ __device__ friend cumat2f operator-(cumat2f rhs);
|
||||||
|
|
||||||
__host__ __device__ float det();
|
__host__ __device__ float det();
|
||||||
__host__ __device__ cumat2f transpose();
|
__host__ __device__ cumat2f transpose();
|
||||||
|
|||||||
@ -43,6 +43,7 @@ namespace amscuda
|
|||||||
__host__ __device__ cumat3 operator/(double lhs);
|
__host__ __device__ cumat3 operator/(double lhs);
|
||||||
__host__ __device__ cuvect3 operator*(cuvect3 lhs);
|
__host__ __device__ cuvect3 operator*(cuvect3 lhs);
|
||||||
__host__ __device__ cumat3 operator*(cumat3 lhs);
|
__host__ __device__ cumat3 operator*(cumat3 lhs);
|
||||||
|
__host__ __device__ friend cumat3 operator-(cumat3 rhs);
|
||||||
|
|
||||||
__host__ __device__ double det();
|
__host__ __device__ double det();
|
||||||
__host__ __device__ cumat3 transpose();
|
__host__ __device__ cumat3 transpose();
|
||||||
|
|||||||
@ -43,10 +43,12 @@ namespace amscuda
|
|||||||
__host__ __device__ cumat3f operator/(float lhs);
|
__host__ __device__ cumat3f operator/(float lhs);
|
||||||
__host__ __device__ cuvect3f operator*(cuvect3f lhs);
|
__host__ __device__ cuvect3f operator*(cuvect3f lhs);
|
||||||
__host__ __device__ cumat3f operator*(cumat3f lhs);
|
__host__ __device__ cumat3f operator*(cumat3f lhs);
|
||||||
|
__host__ __device__ friend cumat3f operator-(cumat3f rhs);
|
||||||
|
|
||||||
__host__ __device__ float det();
|
__host__ __device__ float det();
|
||||||
__host__ __device__ cumat3f transpose();
|
__host__ __device__ cumat3f transpose();
|
||||||
__host__ __device__ cumat3f inverse();
|
__host__ __device__ cumat3f inverse();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
__host__ __device__ float cuvect3f_dot(cuvect3f a, cuvect3f b);
|
__host__ __device__ float cuvect3f_dot(cuvect3f a, cuvect3f b);
|
||||||
|
|||||||
@ -43,6 +43,7 @@ namespace amscuda
|
|||||||
__host__ __device__ cumat4 operator/(double lhs);
|
__host__ __device__ cumat4 operator/(double lhs);
|
||||||
__host__ __device__ cuvect4 operator*(cuvect4 lhs);
|
__host__ __device__ cuvect4 operator*(cuvect4 lhs);
|
||||||
__host__ __device__ cumat4 operator*(cumat4 lhs);
|
__host__ __device__ cumat4 operator*(cumat4 lhs);
|
||||||
|
__host__ __device__ friend cumat4 operator-(cumat4 rhs);
|
||||||
|
|
||||||
__host__ __device__ double det();
|
__host__ __device__ double det();
|
||||||
__host__ __device__ cumat4 transpose();
|
__host__ __device__ cumat4 transpose();
|
||||||
|
|||||||
@ -43,6 +43,7 @@ namespace amscuda
|
|||||||
__host__ __device__ cumat4f operator/(float lhs);
|
__host__ __device__ cumat4f operator/(float lhs);
|
||||||
__host__ __device__ cuvect4f operator*(cuvect4f lhs);
|
__host__ __device__ cuvect4f operator*(cuvect4f lhs);
|
||||||
__host__ __device__ cumat4f operator*(cumat4f lhs);
|
__host__ __device__ cumat4f operator*(cumat4f lhs);
|
||||||
|
__host__ __device__ friend cumat4f operator-(cumat4f rhs);
|
||||||
|
|
||||||
__host__ __device__ float det();
|
__host__ __device__ float det();
|
||||||
__host__ __device__ cumat4f transpose();
|
__host__ __device__ cumat4f transpose();
|
||||||
|
|||||||
@ -359,6 +359,14 @@ __host__ __device__ cuvect2 operator-(cuvect2 rhs)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__host__ __device__ cumat2 operator-(cumat2 rhs)
|
||||||
|
{
|
||||||
|
cumat2 ret;
|
||||||
|
int I;
|
||||||
|
for(I=0;I<4;I++) ret[I] = -rhs[I];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void test_cuvect2_1()
|
void test_cuvect2_1()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -359,6 +359,14 @@ __host__ __device__ cuvect2f operator-(cuvect2f rhs)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__host__ __device__ cumat2f operator-(cumat2f rhs)
|
||||||
|
{
|
||||||
|
cumat2f ret;
|
||||||
|
int I;
|
||||||
|
for(I=0;I<4;I++) ret[I] = -rhs[I];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void test_cuvect2f_1()
|
void test_cuvect2f_1()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -587,6 +587,12 @@ __host__ __device__ cuvect3 operator-(cuvect3 rhs)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__host__ __device__ cumat3 operator-(cumat3 rhs)
|
||||||
|
{
|
||||||
|
cumat3 ret;
|
||||||
|
int I;
|
||||||
|
for(I=0;I<9;I++) ret[I] = -rhs[I];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -587,4 +587,12 @@ __host__ __device__ cuvect3f operator-(cuvect3f rhs)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__host__ __device__ cumat3f operator-(cumat3f rhs)
|
||||||
|
{
|
||||||
|
cumat3f ret;
|
||||||
|
int I;
|
||||||
|
for(I=0;I<9;I++) ret[I] = -rhs[I];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -420,5 +420,13 @@ __host__ __device__ cuvect4 operator-(cuvect4 rhs)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__host__ __device__ cumat4 operator-(cumat4 rhs)
|
||||||
|
{
|
||||||
|
cumat4 ret;
|
||||||
|
int I;
|
||||||
|
for(I=0;I<16;I++) ret[I] = -rhs[I];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -424,4 +424,12 @@ __host__ __device__ cuvect4f operator-(cuvect4f rhs)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__host__ __device__ cumat4f operator-(cumat4f rhs)
|
||||||
|
{
|
||||||
|
cumat4f ret;
|
||||||
|
int I;
|
||||||
|
for(I=0;I<16;I++) ret[I] = -rhs[I];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
}; //namespace amscuda
|
}; //namespace amscuda
|
||||||
|
|||||||
Reference in New Issue
Block a user