From be7946c2afab9dc6b2826f352abd2ee4edd327ca Mon Sep 17 00:00:00 2001 From: jpekkila Date: Sun, 5 Jan 2020 16:47:28 +0200 Subject: [PATCH] Added the multiplication operator for int3 structures --- src/core/math_utils.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/math_utils.h b/src/core/math_utils.h index 942a520..e7e2697 100644 --- a/src/core/math_utils.h +++ b/src/core/math_utils.h @@ -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}; } +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 operator+=(AcReal3& lhs, const AcReal3& rhs) {