integer vector types
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
__host__ __device__ float& cuvec2i::operator[](const int &I)
|
||||
__host__ __device__ int& cuvec2i::operator[](const int &I)
|
||||
{
|
||||
switch(I)
|
||||
{
|
||||
@ -29,7 +29,7 @@
|
||||
return x;
|
||||
}
|
||||
|
||||
__host__ __device__ const float& cuvec2i::operator[](const int &I) const
|
||||
__host__ __device__ const int& cuvec2i::operator[](const int &I) const
|
||||
{
|
||||
switch(I)
|
||||
{
|
||||
@ -198,7 +198,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
__host__ __device__ float& cumat2i::operator[](const int &I)
|
||||
__host__ __device__ int& cumat2i::operator[](const int &I)
|
||||
{
|
||||
switch(I)
|
||||
{
|
||||
@ -215,7 +215,7 @@
|
||||
return m00;
|
||||
}
|
||||
|
||||
__host__ __device__ const float& cumat2i::operator[](const int &I) const
|
||||
__host__ __device__ const int& cumat2i::operator[](const int &I) const
|
||||
{
|
||||
switch(I)
|
||||
{
|
||||
@ -232,22 +232,22 @@
|
||||
return m00;
|
||||
}
|
||||
|
||||
__host__ __device__ float& cumat2i::operator()(const int &I, const int &J)
|
||||
__host__ __device__ int& cumat2i::operator()(const int &I, const int &J)
|
||||
{
|
||||
return (*this)[I+2*J];
|
||||
}
|
||||
|
||||
__host__ __device__ const float& cumat2i::operator()(const int &I, const int &J) const
|
||||
__host__ __device__ const int& cumat2i::operator()(const int &I, const int &J) const
|
||||
{
|
||||
return (*this)[I+2*J];
|
||||
}
|
||||
|
||||
__host__ __device__ float& cumat2i::at(const int &I, const int &J)
|
||||
__host__ __device__ int& cumat2i::at(const int &I, const int &J)
|
||||
{
|
||||
return (*this)[I+2*J];
|
||||
}
|
||||
|
||||
__host__ __device__ const float& cumat2i::at(const int &I, const int &J) const
|
||||
__host__ __device__ const int& cumat2i::at(const int &I, const int &J) const
|
||||
{
|
||||
return (*this)[I+2*J];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user