55 lines
3.0 KiB
C++
55 lines
3.0 KiB
C++
|
|
__host__ __device__ cuvec2();
|
||
|
|
__host__ __device__ ~cuvec2();
|
||
|
|
__host__ __device__ cuvec2(const double &_x, const double &_y);
|
||
|
|
__host__ __device__ float& operator[](const int &I);
|
||
|
|
__host__ __device__ const float& operator[](const int &I) const;
|
||
|
|
__host__ __device__ cuvec2 operator+(const cuvec2& rhs) const;
|
||
|
|
__host__ __device__ cuvec2 operator-(const cuvec2& rhs) const;
|
||
|
|
__host__ __device__ cuvec2 operator*(const cuvec2& rhs) const; //elementwise product
|
||
|
|
__host__ __device__ cuvec2 operator/(const cuvec2& rhs) const; //elementwise division
|
||
|
|
__host__ __device__ friend cuvec2 operator*(const cuvec2& lhs, const double& rhs);
|
||
|
|
__host__ __device__ friend cuvec2 operator*(const double& lhs, const cuvec2& rhs);
|
||
|
|
__host__ __device__ friend cuvec2 operator/(const cuvec2& lhs, const double& rhs);
|
||
|
|
__host__ __device__ friend cuvec2 operator/(const double& lhs, const cuvec2& rhs);
|
||
|
|
__host__ __device__ friend cuvec2 operator-(const cuvec2& other);
|
||
|
|
__host__ __device__ cuvec2& operator+=(const cuvec2& rhs);
|
||
|
|
__host__ __device__ cuvec2& operator-=(const cuvec2& rhs);
|
||
|
|
__host__ __device__ cuvec2& operator*=(const double& rhs);
|
||
|
|
__host__ __device__ cuvec2& operator/=(const double& rhs);
|
||
|
|
//
|
||
|
|
//Matrix Header Stuff
|
||
|
|
//
|
||
|
|
double m00,m10;
|
||
|
|
double m01,m11;
|
||
|
|
|
||
|
|
__host__ __device__ cumat2();
|
||
|
|
__host__ __device__ ~cumat2();
|
||
|
|
__host__ __device__ cumat2(
|
||
|
|
const double& _m00, const double& _m01,
|
||
|
|
const double& _m10, const double& _m11
|
||
|
|
);
|
||
|
|
__host__ __device__ cumat2(const double* data4);
|
||
|
|
__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 float4 representation of matrix
|
||
|
|
__host__ __device__ const double* data() const; //pointer to float4 representation of matrix
|
||
|
|
__host__ __device__ cumat2 operator+(const cumat2& rhs) const;
|
||
|
|
__host__ __device__ cumat2 operator-(const cumat2& rhs) const;
|
||
|
|
__host__ __device__ cumat2 operator*(const cumat2& rhs) const;
|
||
|
|
__host__ __device__ friend cumat2 operator*(const cumat2& lhs, const double& rhs);
|
||
|
|
__host__ __device__ friend cumat2 operator/(const cumat2& lhs, const double& rhs);
|
||
|
|
__host__ __device__ friend cumat2 operator*(const double& lhs, const cumat2& rhs);
|
||
|
|
__host__ __device__ friend cuvec2 operator*(const cumat2& lhs, const cuvec2& rhs);
|
||
|
|
__host__ __device__ friend cuvec2 operator*(const cuvec2& lhs, const cumat2& rhs);
|
||
|
|
__host__ __device__ friend cumat2 operator-(const cumat2& rhs);
|
||
|
|
__host__ __device__ cumat2& operator+=(const cumat2& rhs);
|
||
|
|
__host__ __device__ cumat2& operator-=(const cumat2& rhs);
|
||
|
|
__host__ __device__ cumat2& operator*=(const double& rhs);
|
||
|
|
__host__ __device__ cumat2& operator/=(const double& rhs);
|
||
|
|
__host__ __device__ cumat2& operator*=(const cumat2& rhs);
|
||
|
|
__host__ __device__ cumat2 transpose() const;
|