casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SakuraAlignedArray.h
Go to the documentation of this file.
1 #ifndef _CASA_SAKURA_ALIGNED_ARRAY_H_
2 #define _CASA_SAKURA_ALIGNED_ARRAY_H_
3 
4 #include <iostream>
5 #include <memory>
6 #include <string>
7 
8 //#include <libsakura/sakura.h>
9 
10 #include <casa/aipstype.h>
11 #include <casa/Arrays/Array.h>
12 #include <casa/Arrays/Vector.h>
13 
14 namespace casa { //# NAMESPACE CASA - BEGIN
15 
16 template<typename T>
18 public:
19  SakuraAlignedArray(size_t num_data);
20  SakuraAlignedArray(casacore::Vector<T> const &in_vector);
22 
23  T *data; // pointer to aligned data
24  casacore::Vector<T> *casaVector; // pointer to aligned CASA Vector
25 private:
26  void initialize();
27  size_t num_data_; // number of data to be stored
28  void *storage_; // starting address of allocated memory (unaligned)
29 };
30 
31 } //# NAMESPACE CASA - END
32 
33 #include <casa_sakura/SakuraAlignedArray.tcc>
34 
35 #endif /* _CASA_SAKURA_ALIGNED_ARRAY_H_ */
A 1-D Specialization of the Array class.
casacore::Vector< T > * casaVector
SakuraAlignedArray(size_t num_data)