|
basix_doc 0.1
|
#include <vector.hpp>
Definition at line 81 of file vector.hpp.
| vector | ( | ) | [inline] |
Definition at line 92 of file vector.hpp.
Definition at line 99 of file vector.hpp.
{
Format fm= as<Format > (get_format (c));
nat n= Vec::init_len;
nat l= aligned_size<C,V> (n);
C* a= mmx_formatted_new<C> (l, fm);
Vec::set (a, as<C> (c), n);
rep= new Vector_rep (a, n, l, true, fm);
}
Definition at line 108 of file vector.hpp.
{
nat n= Vec::init_len;
nat l= aligned_size<C,V> (n);
C* a= mmx_formatted_new<C> (l, fm);
Vec::set_as (a, c, n);
rep= new Vector_rep (a, n, l, true, fm);
}
Definition at line 115 of file vector.hpp.
{
Format fm= as<Format > (get_format (x));
nat n= Vec::init_len;
nat l= aligned_size<C,V> (n);
C* a= mmx_formatted_new<C> (l, fm);
Vec::set (a, x, n);
rep= new Vector_rep (a, n, l, true, fm);
}
Definition at line 124 of file vector.hpp.
{
Format fm= as<Format > (CF(v));
nat l= aligned_size<C,V> (N(v));
C* a= mmx_formatted_new<C> (l, fm);
Vec::cast (a, seg (v), N(v));
rep= new Vector_rep (a, N(v), l, is_a_scalar (v), fm);
}
Definition at line 132 of file vector.hpp.
{
nat l= aligned_size<C,V> (N(v));
C* a= mmx_formatted_new<C> (l, fm);
Vec::cast (a, seg (v), N(v));
rep= new Vector_rep (a, N(v), l, is_a_scalar (v), fm);
}
Definition at line 139 of file vector.hpp.
{
Format fm= as<Format > (get_format (c));
nat l= aligned_size<C,V> (n);
C* a= mmx_formatted_new<C> (l, fm);
Vec::set (a, as<C> (c), n);
rep= new Vector_rep (a, n, l, true, fm);
}
Definition at line 146 of file vector.hpp.
{
nat l= aligned_size<C,V> (n);
C* a= mmx_formatted_new<C> (l, get_format (x));
Vec::set (a, x, n);
rep= new Vector_rep (a, n, l, false, get_format (x));
}
Definition at line 152 of file vector.hpp.
{
rep= new Vector_rep (a, n, false, fm);
}
Definition at line 155 of file vector.hpp.
{
rep= new Vector_rep (a, n, l, false, fm);
}
Definition at line 158 of file vector.hpp.
{
rep= new Vector_rep (a, n, l, flag, fm);
}
Definition at line 161 of file vector.hpp.
{
Format fm= CF(it);
nat i, l= Vec::def_len;
if (l==0) l= aligned_size<C,V> ((nat) 1);
C* a= mmx_formatted_new<C> (l, fm);
for (i=0; busy (it); i++, ++it) {
if (i >= l) {
C* b= mmx_formatted_new<C> (aligned_size<C,V> (l<<1), fm);
Vec::copy (b, a, l);
mmx_delete (a, l);
a= b;
l= l<<1;
}
a[i]= *it;
}
rep= new Vector_rep (a, i, l, false, fm);
}
Definition at line 646 of file vector.hpp.
References mmx::append(), ASSERT, mmx::is_non_scalar(), and n.
Definition at line 656 of file vector.hpp.
References ASSERT, mmx::copy(), mmx::is_non_scalar(), mmx::N(), n, and mmx::seg().
{
typedef implementation<vector_linear,V> Vec;
ASSERT (is_non_scalar (*this) && is_non_scalar (w),
"non-scalar vectors expected");
secure ();
nat n= rep->n, p= N(w);
rep->resize (n + p);
Vec::copy (rep->a + n, seg (w), p);
return *this;
}
Definition at line 183 of file vector.hpp.
{
VERIFY (is_non_scalar (*this), "non-scalar vector expected");
VERIFY (i<N(*this), "index out of range");
secure(); return rep->a[i]; }
Definition at line 179 of file vector.hpp.
{
VERIFY (is_non_scalar (*this), "non-scalar vector expected");
VERIFY (i<N(*this), "index out of range");
return rep->a[i]; }
| C& scalar | ( | ) | [inline] |
Definition at line 190 of file vector.hpp.
{
VERIFY (is_a_scalar (*this), "scalar vector expected");
return rep->a[0]; }
| C scalar | ( | ) | const [inline] |
Definition at line 187 of file vector.hpp.
Referenced by mmx::binary_map(), mmx::binary_map_scalar(), mmx::binary_test(), mmx::binary_test_scalar(), mmx::rebuild(), mmx::unary_map(), mmx::unary_set(), mmx::unary_set_scalar(), and mmx::vector_map_2().
{
VERIFY (is_a_scalar (*this), "scalar vector expected");
return rep->a[0]; }
| nat size | ( | ) | const [inline] |
Definition at line 193 of file vector.hpp.
{
return rep->n; }