Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51731 - sandbox/numeric_bindings/boost/numeric/bindings/blas
From: rutger_at_[hidden]
Date: 2009-03-12 03:39:52


Author: rutger
Date: 2009-03-12 03:39:51 EDT (Thu, 12 Mar 2009)
New Revision: 51731
URL: http://svn.boost.org/trac/boost/changeset/51731

Log:
Added norm_2, scale to blas functions

Added:
   sandbox/numeric_bindings/boost/numeric/bindings/blas/norm_2.hpp (contents, props changed)
   sandbox/numeric_bindings/boost/numeric/bindings/blas/scale.hpp (contents, props changed)

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/norm_2.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/norm_2.hpp 2009-03-12 03:39:51 EDT (Thu, 12 Mar 2009)
@@ -0,0 +1,29 @@
+//
+// 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_NORM_2_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_NORM_2_HPP
+
+#include <boost/numeric/bindings/blas/level1/nrm2.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+template< typename VectorX >
+inline typename level1::nrm2_impl<
+ typename traits::vector_traits< VectorX >::value_type >::return_type
+norm_2( VectorX& x ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ return level1::nrm2_impl< value_type >::compute( x );
+}
+
+}}}} // namespace boost::numeric::bindings::blas
+
+#endif

Added: sandbox/numeric_bindings/boost/numeric/bindings/blas/scale.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/boost/numeric/bindings/blas/scale.hpp 2009-03-12 03:39:51 EDT (Thu, 12 Mar 2009)
@@ -0,0 +1,31 @@
+//
+// 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_SCALE_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_SCALE_HPP
+
+#include <boost/numeric/bindings/blas/level1/scal.hpp>
+
+namespace boost {
+namespace numeric {
+namespace bindings {
+namespace blas {
+
+//using scale = level1::scal;
+template< typename VectorX >
+inline typename level1::scal_impl<
+ typename traits::vector_traits< VectorX >::value_type >::return_type
+scale( typename traits::vector_traits< VectorX >::value_type const a,
+ VectorX& x ) {
+ typedef typename traits::vector_traits< VectorX >::value_type value_type;
+ level1::scal_impl< value_type >::compute( a, x );
+}
+
+}}}} // 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