// -*- C++ -*- /*************************************************************************** * blitz/tvecglobs.h TinyVector global functions * * $Id$ * * Copyright (C) 1997-2011 Todd Veldhuizen * * This file is a part of Blitz. * * Blitz is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation, either version 3 * of the License, or (at your option) any later version. * * Blitz is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with Blitz. If not, see . * * Suggestions: blitz-devel@lists.sourceforge.net * Bugs: blitz-support@lists.sourceforge.net * * For more information, please see the Blitz++ Home Page: * https://sourceforge.net/projects/blitz/ * ***************************************************************************/ #ifndef BZ_TVECGLOBS_H #define BZ_TVECGLOBS_H #include #include #include // Cross products #include #include #include BZ_NAMESPACE(blitz) template inline BZ_PROMOTE(T_numtype1, T_numtype2) dot(const TinyVector& a, const TinyVector& b) { return _bz_meta_vectorDot::f(a,b); } template inline BZ_SUMTYPE(T_numtype1) product(const TinyVector& a) { return _bz_meta_vectorProduct::f(a); } template inline BZ_SUMTYPE(T_numtype) sum(const TinyVector& a) { return _bz_meta_vectorSum::f(a); } // explicit returntype functions follow template class _bz_returntype { public: template static inline T_ret dot(const TinyVector& a, const TinyVector& b) { return _bz_meta_vectorDotRet::f(a,b); }; template static inline T_ret product(const TinyVector& a) { return _bz_meta_vectorProductRet::f(a); }; template static inline T_ret sum(const TinyVector& a) { return _bz_meta_vectorSumRet::f(a); }; }; BZ_NAMESPACE_END #endif // BZ_TVECGLOBS_H