Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
vector.h
Go to the documentation of this file.
1 #ifndef __VECTOR_H__
2 #define __VECTOR_H__
3 
4 namespace CTF {
5 
13  template <typename dtype=double>
14  class Vector : public Tensor<dtype> {
15  public:
16  int len;
20  Vector();
21 
26  Vector<dtype>(Vector<dtype> const & A);
27 
32  Vector<dtype>(Tensor<dtype> const & A);
33 
40  Vector(int len,
41  World & world,
42  CTF_int::algstrct const & sr);
43 
52  Vector(int len,
53  World & world=get_universe(),
54  char const * name=NULL,
55  int profile=0,
56  CTF_int::algstrct const & sr=Ring<dtype>());
57 
65  Vector(int len,
66  int atr,
67  World & world=get_universe(),
68  CTF_int::algstrct const & sr=Ring<dtype>());
69 
70 
77  Vector(int len,
78  int atr,
79  World & world,
80  char const * name,
81  int profile=0,
82  CTF_int::algstrct const & sr=Ring<dtype>());
83 
84 
85 
86  //Vector<dtype> & operator=(const Vector<dtype> & A);
90  };
91 }
92 #include "vector.cxx"
93 #endif
Ring class defined by a datatype and addition and multiplicaton functions addition must have an ident...
Definition: ring.h:18
Vector class which encapsulates a 1D tensor.
Definition: vector.h:14
an instance of the CTF library (world) on a MPI communicator
Definition: world.h:19
algstrct * sr
algstrct on which tensor elements and operations are defined
World & get_universe()
Definition: world.cxx:309
bool profile
whether profiling should be done for contractions/sums involving this tensor
algstrct (algebraic structure) defines the elementwise operations computed in each tensor contraction...
Definition: algstrct.h:34
Definition: apsp.cxx:17
Vector()
default constructor for a vector
Definition: vector.cxx:20
an instance of a tensor within a CTF world
Definition: tensor.h:74
int len
Definition: vector.h:16
char * name
name given to tensor