Commits
Takeshi Nakazato authored and Ville Suoranta committed 858b6cb67c7 Merge
13 13 | |
14 14 | namespace casa { //# NAMESPACE CASA - BEGIN |
15 15 | |
16 16 | template<typename T> |
17 17 | class SakuraAlignedArray { |
18 18 | public: |
19 19 | SakuraAlignedArray(size_t num_data); |
20 20 | SakuraAlignedArray(casacore::Vector<T> const &in_vector); |
21 21 | ~SakuraAlignedArray(); |
22 22 | |
23 - | T *data; // pointer to aligned data |
24 - | casacore::Vector<T> *casaVector; // pointer to aligned CASA Vector |
23 + | T *data() const {return data_;} |
24 + | casacore::Vector<T> casaVector() const { |
25 + | return casacore::Vector<T>(casacore::IPosition(1, num_data_), data_, |
26 + | casacore::SHARE); |
27 + | } |
25 28 | private: |
26 29 | void initialize(); |
27 30 | size_t num_data_; // number of data to be stored |
28 31 | void *storage_; // starting address of allocated memory (unaligned) |
32 + | T *data_; // pointer to aligned data |
29 33 | }; |
30 34 | |
31 35 | } //# NAMESPACE CASA - END |
32 36 | |
33 37 | |
34 - | |
38 + | |
35 39 | /* _CASA_SAKURA_ALIGNED_ARRAY_H_ */ |