Ejemplo n.º 1
0
 result_type operator()(matrix_base<ScalarType, Layout> const & mat) const {
   mapped_matrix * p = new mapped_matrix(utils::type_to_string<ScalarType>::value());
   p->name_ = create_name(current_arg_, memory_, (void*)&mat);
   p->is_row_major_ = static_cast<bool>(utils::is_same_type<Layout, viennacl::row_major>::value);
   if(mat.start1() > 0)
     p->start1_name_ = p->name_ +"_start1";
   if(mat.stride1() > 1)
     p->stride1_name_ = p->name_ + "_stride1";
   if(mat.start2() > 0)
     p->start2_name_ = p->name_ +"_start2";
   if(mat.stride2() > 1)
     p->stride2_name_ = p->name_ + "_stride2";
   return container_ptr_type(p);
 }
Ejemplo n.º 2
0
typename result_of::size_type< matrix_base<NumericT> >::type
stride1(matrix_base<NumericT> const & s) { return s.stride1(); }
Ejemplo n.º 3
0
vcl_size_t nld(matrix_base<NumericT> const & mat)
{
  if (mat.row_major())
    return mat.stride2();
  return mat.stride1();
}