vector_rep< C, V > Class Template Reference

#include <vector.hpp>

Inheritance diagram for vector_rep< C, V >:
rep_struct format< C > empty_format

List of all members.

Public Types

Public Member Functions

Public Attributes

Friends


Detailed Description

template<typename C, typename V>
class mmx::vector_rep< C, V >

Definition at line 53 of file vector.hpp.


Member Typedef Documentation

typedef empty_format FT [inherited]

Definition at line 196 of file type_props.hpp.

typedef implementation<vector_linear,V> Vec

Definition at line 55 of file vector.hpp.


Constructor & Destructor Documentation

vector_rep ( C a2,
nat  n2,
bool  flag,
const format< C > &  fm 
) [inline]

Definition at line 62 of file vector.hpp.

00062                                                                 :
00063     Format (fm), a (a2), n (n2), l (n2), scalar_flag (flag) {}
  inline vector_rep (C* a2, nat n2, nat l2, bool flag, const Format& fm):

vector_rep ( C a2,
nat  n2,
nat  l2,
bool  flag,
const format< C > &  fm 
) [inline]

Definition at line 64 of file vector.hpp.

00064                                                                         :
00065     Format (fm), a (a2), n (n2), l (l2), scalar_flag (flag) {}
  inline ~vector_rep () { mmx_delete<C> (a, l); }

~vector_rep (  )  [inline]

Definition at line 66 of file vector.hpp.

00066 { mmx_delete<C> (a, l); }


Member Function Documentation

empty_format format1 (  )  const [inline, inherited]

Definition at line 189 of file type_props.hpp.

Referenced by mmx::get_format1().

00189 { return empty_format (); }

empty_format format2 (  )  const [inline, inherited]

Definition at line 190 of file type_props.hpp.

Referenced by mmx::get_format2().

00190 { return empty_format (); }

empty_format format3 (  )  const [inline, inherited]

Definition at line 191 of file type_props.hpp.

00191 { return empty_format (); }

void resize ( nat  n2  )  [inline]

Definition at line 67 of file vector.hpp.

00067                        {
00068     nat l2;
00069     if (n2 > l) l2= aligned_size<C,V> (max (n2, l<<1));
00070     else if (n2 < (l >> 1)) l2= aligned_size<C,V> (n2);
00071     else { n= n2; return; }
00072     C* b= mmx_new<C> (l2);
00073     Vec::copy (b, a, min (n, n2));
00074     mmx_delete<C> (a, l);
00075     a= b;
00076     n= n2;
00077     l= l2;
00078   }

empty_format rfm (  )  const [inline, inherited]

Definition at line 188 of file type_props.hpp.

00188 { return *this; }

C sample (  )  const [inline, inherited]

Definition at line 202 of file type_props.hpp.

Referenced by mmx::get_sample().

00202 { return C(); }

format<C> tfm (  )  const [inline, inherited]

Definition at line 201 of file type_props.hpp.

00201 { return *this; }


Friends And Related Function Documentation

bool is_a_scalar ( const vector< C, V > &  v  )  [friend]

Definition at line 212 of file vector.hpp.

00212 { return v->scalar_flag; }

bool is_non_scalar ( const vector< C, V > &  v  )  [friend]

Definition at line 213 of file vector.hpp.

00213 { return !v->scalar_flag; }

nat N ( const vector< C, V > &  v  )  [friend]

Definition at line 210 of file vector.hpp.

00210 { return v->n; }

const C* seg ( const vector< C, V > &  v  )  [friend]

Definition at line 215 of file vector.hpp.

00215 { return v->a; }

C* seg ( vector< C, V > &  v  )  [friend]

Definition at line 216 of file vector.hpp.

00216                                {
00217   VERIFY (is_non_scalar (v), "non-scalar vector expected");
00218   v.secure(); return v->a; }

C* seg_inside ( const vector< C, V > &  v  )  [friend]

Definition at line 219 of file vector.hpp.

00219 { return inside (v)->a; }

friend class vector< C, V > [friend]

Definition at line 79 of file vector.hpp.


Member Data Documentation

MMX_ALLOCATORS int ref_count [inherited]

Definition at line 164 of file basix.hpp.


The documentation for this class was generated from the following file:

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1