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