integer vector types

This commit is contained in:
2026-04-13 12:16:10 -04:00
parent e3be5a8a2c
commit 4530ed3603
23 changed files with 757 additions and 126 deletions

View File

@ -1,8 +1,8 @@
__host__ __device__ cuvec2i();
__host__ __device__ ~cuvec2i();
__host__ __device__ cuvec2i(const int &_x, const int &_y);
__host__ __device__ float& operator[](const int &I);
__host__ __device__ const float& operator[](const int &I) const;
__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
@ -29,14 +29,14 @@ int m01,m11;
const int& _m10, const int& _m11
);
__host__ __device__ cumat2i(const int* 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__ int* data(); //pointer to float4 representation of matrix
__host__ __device__ const int* data() const; //pointer to float4 representation of matrix
__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;