Files
amsculib3/test_scripts/cuvec_codegen/cuvec2_codegen1.hpp

55 lines
3.0 KiB
C++
Raw Normal View History

2026-04-13 11:42:40 -04:00
__host__ __device__ cuvec2();
__host__ __device__ ~cuvec2();
__host__ __device__ cuvec2(const double &_x, const double &_y);
2026-04-13 12:16:10 -04:00
__host__ __device__ double& operator[](const int &I);
__host__ __device__ const double& operator[](const int &I) const;
2026-04-13 11:42:40 -04:00
__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);
2026-04-13 12:16:10 -04:00
__host__ __device__ double& operator[](const int &I);
__host__ __device__ const double& operator[](const int &I) const;
__host__ __device__ double& operator()(const int &I, const int &J);
__host__ __device__ const double& operator()(const int &I, const int &J) const;
__host__ __device__ double& at(const int &I, const int &J);
__host__ __device__ const double& at(const int &I, const int &J) const;
__host__ __device__ double* data(); //pointer to double4 representation of matrix
__host__ __device__ const double* data() const; //pointer to double4 representation of matrix
2026-04-13 11:42:40 -04:00
__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;