示例#1
0
 CUDA_CALL double dot(const T1& lhs, const T2& rhs) {
   return
       lhs.x() * rhs.x() +
       lhs.y() * rhs.y() +
       lhs.z() * rhs.z();
 }
示例#2
0
 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());
 }