28 #ifndef REMORA_KERNELS_DEFAULT_PROXIES_HPP 29 #define REMORA_KERNELS_DEFAULT_PROXIES_HPP 31 #include "../../detail/matrix_proxy_classes.hpp" 32 #include "../../detail/vector_proxy_classes.hpp" 41 namespace remora{
namespace bindings {
45 vector_range<typename const_expression<V>::type>
46 simple_subrange(vector_expression<V, cpu_tag>
const& expression, std::size_t start, std::size_t stop){
47 return vector_range<typename const_expression<V>::type>(expression(), start, stop);
52 simple_subrange(vector_expression<V, cpu_tag>& expression, std::size_t start, std::size_t stop){
53 return vector_range<V>(expression(), start, stop);
58 matrix_range<typename const_expression<M>::type>
59 simple_subrange(matrix_expression<M, cpu_tag>
const& expression,
60 std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2 ){
61 return matrix_range<typename const_expression<M>::type>(expression(), start1, stop1, start2, stop2);
66 simple_subrange(matrix_expression<M, cpu_tag>& expression,
67 std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2 ){
68 return matrix_range<M>(expression(), start1, stop1, start2, stop2);
73 matrix_row<typename const_expression<M>::type>
74 simple_row(matrix_expression<M, cpu_tag>
const& expression,
typename M::size_type i){
75 return matrix_row<typename const_expression<M>::type>(expression(), i);
79 simple_row(matrix_expression<M, cpu_tag>& expression,
typename M::size_type i){
80 return matrix_row<M>(expression(), i);
85 matrix_row< matrix_transpose< typename const_expression<M>::type > >
86 simple_column(matrix_expression<M, cpu_tag>
const& expression,
typename M::size_type i){
87 typedef matrix_transpose< typename const_expression<M>::type > TransE;
88 TransE transE(expression());
89 return matrix_row< TransE >(transE, i);
92 matrix_row< matrix_transpose<M> >
93 simple_column(matrix_expression<M, cpu_tag>& expression,
typename M::size_type i){
94 typedef matrix_transpose<M> TransE;
95 TransE transE(expression());
96 return matrix_row< TransE >(transE, i);
101 matrix_transpose< typename const_expression<M>::type >
102 simple_trans(matrix_expression<M, cpu_tag>
const& m){
103 return matrix_transpose< typename const_expression<M>::type >(m());
107 simple_trans(matrix_expression<M, cpu_tag>& m){
108 return matrix_transpose<M>(m());