/[escript]/branches/diaplayground/cusplibrary/cusp/elementwise.h
ViewVC logotype

Contents of /branches/diaplayground/cusplibrary/cusp/elementwise.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4955 - (show annotations)
Tue May 20 04:33:15 2014 UTC (5 years, 1 month ago) by caltinay
File MIME type: text/plain
File size: 1770 byte(s)
added pristine copy of cusplibrary (apache license) to be used by ripley.

1 /*
2 * Copyright 2008-2009 NVIDIA Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /*! \file elementwise.h
18 * \brief Elementwise operations on matrices.
19 */
20
21 #pragma once
22
23 #include <cusp/detail/config.h>
24
25 namespace cusp
26 {
27
28 /*! \addtogroup algorithms Algorithms
29 * \ingroup algorithms
30 * \{
31 */
32
33 //// Uses Matrix1::value_type(0) and Matrix2::value_type(0) for values not present
34 //template <typename Matrix1,
35 // typename Matrix2,
36 // typename Matrix3,
37 // typename BinaryFunction>
38 //void transform_elementwise(const Matrix1& A,
39 // const Matrix2& B,
40 // Matrix3& C,
41 // BinaryFunction op);
42
43 /*! \p add : Compute the sum of two matrices
44 */
45 template <typename Matrix1,
46 typename Matrix2,
47 typename Matrix3>
48 void add(const Matrix1& A,
49 const Matrix2& B,
50 Matrix3& C);
51
52 /*! \p add : Compute the difference of two matrices
53 */
54 template <typename Matrix1,
55 typename Matrix2,
56 typename Matrix3>
57 void subtract(const Matrix1& A,
58 const Matrix2& B,
59 Matrix3& C);
60 /*! \}
61 */
62
63 } // end namespace cusp
64
65 #include <cusp/detail/elementwise.inl>
66

  ViewVC Help
Powered by ViewVC 1.1.26