polishing cucomp64 type

This commit is contained in:
2026-04-11 12:18:19 -04:00
parent f315dfb6f6
commit 018d75a67d
19 changed files with 105 additions and 74 deletions

View File

@ -18,23 +18,26 @@ namespace cmp
__host__ __device__ explicit cucomp64(const float &other);
__host__ __device__ explicit cucomp64(const float &_real, const float &_imag);
__host__ __device__ cucomp64& operator=(cucomp64& other);
__host__ __device__ const cucomp64& operator=(const cucomp64& other);
__host__ __device__ cucomp64& operator=(float& other);
__host__ __device__ const cucomp64& operator=(const float& other);
__host__ __device__ cucomp64& operator=(const cucomp64& other);
__host__ __device__ cucomp64& operator=(const float& other);
__host__ __device__ float& operator[](int& ind);
__host__ __device__ const float& operator[](const int& ind) const;
__host__ __device__ cucomp64 operator+(const cucomp64& z);
__host__ __device__ cucomp64 operator-(const cucomp64& z);
__host__ __device__ cucomp64 operator*(const cucomp64& z);
__host__ __device__ cucomp64 operator/(const cucomp64& z);
__host__ __device__ cucomp64 operator+(const cucomp64& z) const;
__host__ __device__ cucomp64 operator-(const cucomp64& z) const;
__host__ __device__ cucomp64 operator*(const cucomp64& z) const;
__host__ __device__ cucomp64 operator/(const cucomp64& z) const;
__host__ __device__ cucomp64 operator+(const float& z);
__host__ __device__ cucomp64 operator-(const float& z);
__host__ __device__ cucomp64 operator*(const float& z);
__host__ __device__ cucomp64 operator/(const float& z);
__host__ __device__ friend cucomp64 operator+(const cucomp64& z1, const float& z2);
__host__ __device__ friend cucomp64 operator-(const cucomp64& z1, const float& z2);
__host__ __device__ friend cucomp64 operator*(const cucomp64& z1, const float& z2);
__host__ __device__ friend cucomp64 operator/(const cucomp64& z1, const float& z2);
__host__ __device__ friend cucomp64 operator+(const float& z1, const cucomp64& z2);
__host__ __device__ friend cucomp64 operator-(const float& z1, const cucomp64& z2);
__host__ __device__ friend cucomp64 operator*(const float& z1, const cucomp64& z2);
__host__ __device__ friend cucomp64 operator/(const float& z1, const cucomp64& z2);
__host__ __device__ friend cucomp64 operator-(const cucomp64& z); //negation sign