|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51718 - sandbox/numeric_bindings/boost/numeric/bindings/blas
From: rutger_at_[hidden]
Date: 2009-03-11 16:40:47
Author: rutger
Date: 2009-03-11 16:40:47 EDT (Wed, 11 Mar 2009)
New Revision: 51718
URL: http://svn.boost.org/trac/boost/changeset/51718
Log:
Added trivial functions swap, copy, and ditpatching dot
Added:
sandbox/numeric_bindings/boost/numeric/bindings/blas/copy.hpp (contents, props changed)
sandbox/numeric_bindings/boost/numeric/bindings/blas/dot.hpp (contents, props changed)
sandbox/numeric_bindings/boost/numeric/bindings/blas/swap.hpp (contents, props changed)
Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/copy.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/copy.hpp 2009-03-11 16:40:47 EDT (Wed, 11 Mar 2009)
@@ -0,0 +1,23 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_COPY_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_COPY_HPP
+
+#include <boost/numeric/bindings/blas/level1/copy.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+using level1::copy;
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif
Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/dot.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/dot.hpp 2009-03-11 16:40:47 EDT (Wed, 11 Mar 2009)
@@ -0,0 +1,45 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DOT_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_DOT_HPP
+
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/map.hpp>
+#include <boost/numeric/bindings/blas/level1/dot.hpp>
+#include <boost/numeric/bindings/blas/level1/dotc.hpp>
+#include <boost/numeric/bindings/blas/level1/dotu.hpp>
+
+namespace mpl = ::boost::mpl;
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+template< typename Vector >
+struct dot_dispatcher {
+ typedef typename traits::vector_traits< Vector >::value_type value_type;
+ typedef typename mpl::map<
+ mpl::pair< float, level1::dot_impl< value_type > >,
+ mpl::pair< double, level1::dot_impl< value_type > >,
+ mpl::pair< traits::complex_f, level1::dotu_impl< value_type > >,
+ mpl::pair< traits::complex_d, level1::dotu_impl< value_type > > > map;
+ typedef typename mpl::at< map, value_type >::type routine;
+};
+
+template< typename VectorX, typename VectorY >
+inline typename dot_dispatcher< VectorX >::routine::return_type
+dot( VectorX& x, VectorY& y ) {
+ typedef typename dot_dispatcher< VectorX >::routine routine;
+ return routine::compute( x, y );
+}
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif
Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/swap.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/swap.hpp 2009-03-11 16:40:47 EDT (Wed, 11 Mar 2009)
@@ -0,0 +1,23 @@
+//
+// Copyright (c) 2009 Rutger ter Borg
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_SWAP_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SWAP_HPP
+
+#include <boost/numeric/bindings/blas/level1/swap.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+using level1::swap;
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk