codegenerated matrix logic
This commit is contained in:
56
test_scripts/cuvec_codegen/cuvec3_codegen1.hpp
Normal file
56
test_scripts/cuvec_codegen/cuvec3_codegen1.hpp
Normal file
@ -0,0 +1,56 @@
|
||||
__host__ __device__ cuvec3();
|
||||
__host__ __device__ ~cuvec3();
|
||||
__host__ __device__ cuvec3(const double &_x, const double &_y, const double &_z);
|
||||
__host__ __device__ float& operator[](const int &I);
|
||||
__host__ __device__ const float& operator[](const int &I) const;
|
||||
__host__ __device__ cuvec3 operator+(const cuvec3& rhs) const;
|
||||
__host__ __device__ cuvec3 operator-(const cuvec3& rhs) const;
|
||||
__host__ __device__ cuvec3 operator*(const cuvec3& rhs) const; //elementwise product
|
||||
__host__ __device__ cuvec3 operator/(const cuvec3& rhs) const; //elementwise division
|
||||
__host__ __device__ friend cuvec3 operator*(const cuvec3& lhs, const double& rhs);
|
||||
__host__ __device__ friend cuvec3 operator*(const double& lhs, const cuvec3& rhs);
|
||||
__host__ __device__ friend cuvec3 operator/(const cuvec3& lhs, const double& rhs);
|
||||
__host__ __device__ friend cuvec3 operator/(const double& lhs, const cuvec3& rhs);
|
||||
__host__ __device__ friend cuvec3 operator-(const cuvec3& other);
|
||||
__host__ __device__ cuvec3& operator+=(const cuvec3& rhs);
|
||||
__host__ __device__ cuvec3& operator-=(const cuvec3& rhs);
|
||||
__host__ __device__ cuvec3& operator*=(const double& rhs);
|
||||
__host__ __device__ cuvec3& operator/=(const double& rhs);
|
||||
//
|
||||
//Matrix Header Stuff
|
||||
//
|
||||
double m00,m10,m20;
|
||||
double m01,m11,m21;
|
||||
double m02,m12,m22;
|
||||
|
||||
__host__ __device__ cumat3();
|
||||
__host__ __device__ ~cumat3();
|
||||
__host__ __device__ cumat3(
|
||||
const double& _m00, const double& _m01, const double& _m02,
|
||||
const double& _m10, const double& _m11, const double& _m12,
|
||||
const double& _m20, const double& _m21, const double& _m22
|
||||
);
|
||||
__host__ __device__ cumat3(const double* data9);
|
||||
__host__ __device__ float& operator[](const int &I);
|
||||
__host__ __device__ const float& operator[](const int &I) const;
|
||||
__host__ __device__ float& operator()(const int &I, const int &J);
|
||||
__host__ __device__ const float& operator()(const int &I, const int &J) const;
|
||||
__host__ __device__ float& at(const int &I, const int &J);
|
||||
__host__ __device__ const float& at(const int &I, const int &J) const;
|
||||
__host__ __device__ double* data(); //pointer to float9 representation of matrix
|
||||
__host__ __device__ const double* data() const; //pointer to float9 representation of matrix
|
||||
__host__ __device__ cumat3 operator+(const cumat3& rhs) const;
|
||||
__host__ __device__ cumat3 operator-(const cumat3& rhs) const;
|
||||
__host__ __device__ cumat3 operator*(const cumat3& rhs) const;
|
||||
__host__ __device__ friend cumat3 operator*(const cumat3& lhs, const double& rhs);
|
||||
__host__ __device__ friend cumat3 operator/(const cumat3& lhs, const double& rhs);
|
||||
__host__ __device__ friend cumat3 operator*(const double& lhs, const cumat3& rhs);
|
||||
__host__ __device__ friend cuvec3 operator*(const cumat3& lhs, const cuvec3& rhs);
|
||||
__host__ __device__ friend cuvec3 operator*(const cuvec3& lhs, const cumat3& rhs);
|
||||
__host__ __device__ friend cumat3 operator-(const cumat3& rhs);
|
||||
__host__ __device__ cumat3& operator+=(const cumat3& rhs);
|
||||
__host__ __device__ cumat3& operator-=(const cumat3& rhs);
|
||||
__host__ __device__ cumat3& operator*=(const double& rhs);
|
||||
__host__ __device__ cumat3& operator/=(const double& rhs);
|
||||
__host__ __device__ cumat3& operator*=(const cumat3& rhs);
|
||||
__host__ __device__ cumat3 transpose() const;
|
||||
Reference in New Issue
Block a user