55 lines
3.0 KiB
C++
55 lines
3.0 KiB
C++
__host__ __device__ cuvec2i();
|
|
__host__ __device__ ~cuvec2i();
|
|
__host__ __device__ cuvec2i(const int &_x, const int &_y);
|
|
__host__ __device__ int& operator[](const int &I);
|
|
__host__ __device__ const int& operator[](const int &I) const;
|
|
__host__ __device__ cuvec2i operator+(const cuvec2i& rhs) const;
|
|
__host__ __device__ cuvec2i operator-(const cuvec2i& rhs) const;
|
|
__host__ __device__ cuvec2i operator*(const cuvec2i& rhs) const; //elementwise product
|
|
__host__ __device__ cuvec2i operator/(const cuvec2i& rhs) const; //elementwise division
|
|
__host__ __device__ friend cuvec2i operator*(const cuvec2i& lhs, const int& rhs);
|
|
__host__ __device__ friend cuvec2i operator*(const int& lhs, const cuvec2i& rhs);
|
|
__host__ __device__ friend cuvec2i operator/(const cuvec2i& lhs, const int& rhs);
|
|
__host__ __device__ friend cuvec2i operator/(const int& lhs, const cuvec2i& rhs);
|
|
__host__ __device__ friend cuvec2i operator-(const cuvec2i& other);
|
|
__host__ __device__ cuvec2i& operator+=(const cuvec2i& rhs);
|
|
__host__ __device__ cuvec2i& operator-=(const cuvec2i& rhs);
|
|
__host__ __device__ cuvec2i& operator*=(const int& rhs);
|
|
__host__ __device__ cuvec2i& operator/=(const int& rhs);
|
|
//
|
|
//Matrix Header Stuff
|
|
//
|
|
int m00,m10;
|
|
int m01,m11;
|
|
|
|
__host__ __device__ cumat2i();
|
|
__host__ __device__ ~cumat2i();
|
|
__host__ __device__ cumat2i(
|
|
const int& _m00, const int& _m01,
|
|
const int& _m10, const int& _m11
|
|
);
|
|
__host__ __device__ cumat2i(const int* data4);
|
|
__host__ __device__ int& operator[](const int &I);
|
|
__host__ __device__ const int& operator[](const int &I) const;
|
|
__host__ __device__ int& operator()(const int &I, const int &J);
|
|
__host__ __device__ const int& operator()(const int &I, const int &J) const;
|
|
__host__ __device__ int& at(const int &I, const int &J);
|
|
__host__ __device__ const int& at(const int &I, const int &J) const;
|
|
__host__ __device__ int* data(); //pointer to int4 representation of matrix
|
|
__host__ __device__ const int* data() const; //pointer to int4 representation of matrix
|
|
__host__ __device__ cumat2i operator+(const cumat2i& rhs) const;
|
|
__host__ __device__ cumat2i operator-(const cumat2i& rhs) const;
|
|
__host__ __device__ cumat2i operator*(const cumat2i& rhs) const;
|
|
__host__ __device__ friend cumat2i operator*(const cumat2i& lhs, const int& rhs);
|
|
__host__ __device__ friend cumat2i operator/(const cumat2i& lhs, const int& rhs);
|
|
__host__ __device__ friend cumat2i operator*(const int& lhs, const cumat2i& rhs);
|
|
__host__ __device__ friend cuvec2i operator*(const cumat2i& lhs, const cuvec2i& rhs);
|
|
__host__ __device__ friend cuvec2i operator*(const cuvec2i& lhs, const cumat2i& rhs);
|
|
__host__ __device__ friend cumat2i operator-(const cumat2i& rhs);
|
|
__host__ __device__ cumat2i& operator+=(const cumat2i& rhs);
|
|
__host__ __device__ cumat2i& operator-=(const cumat2i& rhs);
|
|
__host__ __device__ cumat2i& operator*=(const int& rhs);
|
|
__host__ __device__ cumat2i& operator/=(const int& rhs);
|
|
__host__ __device__ cumat2i& operator*=(const cumat2i& rhs);
|
|
__host__ __device__ cumat2i transpose() const;
|