CUDA_CALL double dot(const T1& lhs, const T2& rhs) { return lhs.x() * rhs.x() + lhs.y() * rhs.y() + lhs.z() * rhs.z(); }
CUDA_CALL Vector cross(const T1& lhs, const T2& rhs) { return Vector( lhs.y() * rhs.z() - lhs.z() * rhs.y(), lhs.z() * rhs.x() - lhs.x() * rhs.z(), lhs.x() * rhs.y() - lhs.y() * rhs.x()); }