mgcpp
A C++ Math Library Based on CUDA
map.hpp
Go to the documentation of this file.
1 
2 // Copyright RedPortal, mujjingun 2017 - 2018.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef _MGCPP_OPERATIONS_ABSOLUTE_HPP_
8 #define _MGCPP_OPERATIONS_ABSOLUTE_HPP_
9 
14 
15 #include <cstdlib>
16 
17 namespace mgcpp {
18 namespace strict {
19 
20 template <typename Type,
21  outcome::result<void> (*Function)(Type*, size_t),
22  typename DenseVec>
23 inline device_vector<Type, typename DenseVec::allocator_type> map(
24  dense_vector<DenseVec, Type> const& vec);
25 
26 template <typename Type,
27  outcome::result<void> (*Function)(Type*, size_t),
28  typename DenseMat>
29 inline device_matrix<Type, typename DenseMat::allocator_type> map(
30  dense_matrix<DenseMat, Type> const& mat);
31 
35 template <typename DenseVec, typename Type>
36 inline decltype(auto) abs(dense_vector<DenseVec, Type> const& vec);
37 
41 template <typename DenseMat, typename Type>
42 inline decltype(auto) abs(dense_matrix<DenseMat, Type> const& mat);
43 
44 template <typename DenseVec, typename Type>
45 inline decltype(auto) sin(dense_vector<DenseVec, Type> const& vec);
46 
47 template <typename DenseMat, typename Type>
48 inline decltype(auto) sin(dense_matrix<DenseMat, Type> const& mat);
49 
50 template <typename DenseVec, typename Type>
51 inline decltype(auto) cos(dense_vector<DenseVec, Type> const& vec);
52 
53 template <typename DenseMat, typename Type>
54 inline decltype(auto) cos(dense_matrix<DenseMat, Type> const& mat);
55 
56 template <typename DenseVec, typename Type>
57 inline decltype(auto) tan(dense_vector<DenseVec, Type> const& vec);
58 
59 template <typename DenseMat, typename Type>
60 inline decltype(auto) tan(dense_matrix<DenseMat, Type> const& mat);
61 
62 template <typename DenseVec, typename Type>
63 inline decltype(auto) sinh(dense_vector<DenseVec, Type> const& vec);
64 
65 template <typename DenseMat, typename Type>
66 inline decltype(auto) sinh(dense_matrix<DenseMat, Type> const& mat);
67 
68 template <typename DenseVec, typename Type>
69 inline decltype(auto) cosh(dense_vector<DenseVec, Type> const& vec);
70 
71 template <typename DenseMat, typename Type>
72 inline decltype(auto) cosh(dense_matrix<DenseMat, Type> const& mat);
73 
74 template <typename DenseVec, typename Type>
75 inline decltype(auto) tanh(dense_vector<DenseVec, Type> const& vec);
76 
77 template <typename DenseMat, typename Type>
78 inline decltype(auto) tanh(dense_matrix<DenseMat, Type> const& mat);
79 
80 template <typename DenseVec, typename Type>
81 inline decltype(auto) relu(dense_vector<DenseVec, Type> const& vec);
82 
83 template <typename DenseMat, typename Type>
84 inline decltype(auto) relu(dense_matrix<DenseMat, Type> const& mat);
85 } // namespace strict
86 } // namespace mgcpp
87 
88 #include <mgcpp/operations/map.tpp>
89 #endif
Definition: adapter_base.hpp:12
decltype(auto) tan(dense_vector< DenseVec, Type > const &vec)
decltype(auto) sinh(dense_vector< DenseVec, Type > const &vec)
decltype(auto) abs(dense_vector< DenseVec, Type > const &vec)
decltype(auto) tanh(dense_vector< DenseVec, Type > const &vec)
decltype(auto) cos(dense_vector< DenseVec, Type > const &vec)
decltype(auto) cosh(dense_vector< DenseVec, Type > const &vec)
device_vector< Type, typename DenseVec::allocator_type > map(dense_vector< DenseVec, Type > const &vec)
decltype(auto) sin(dense_vector< DenseVec, Type > const &vec)
BOOST_OUTCOME_V2_NAMESPACE::std_result< R > result
Definition: outcome.hpp:8
decltype(auto) relu(dense_vector< DenseVec, Type > const &vec)