Added the multiplication operator for int3 structures

This commit is contained in:
jpekkila
2020-01-05 16:47:28 +02:00
parent 51b48a5a36
commit be7946c2af

View File

@@ -101,6 +101,11 @@ operator+(const int3& a, const int3& b)
return (int3){a.x + b.x, a.y + b.y, a.z + b.z}; return (int3){a.x + b.x, a.y + b.y, a.z + b.z};
} }
static HOST_DEVICE_INLINE int3 operator*(const int3& a, const int3& b)
{
return (int3){a.x * b.x, a.y * b.y, a.z * b.z};
}
static HOST_DEVICE_INLINE void static HOST_DEVICE_INLINE void
operator+=(AcReal3& lhs, const AcReal3& rhs) operator+=(AcReal3& lhs, const AcReal3& rhs)
{ {