DP3
CursorUtilCasa.h
Go to the documentation of this file.
1 // CursorUtilCasa.h: Helper functions for creating cursors for CASA arrays.
2 //
3 // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 
8 
9 #ifndef DPPP_CURSORUTILCASA_H
10 #define DPPP_CURSORUTILCASA_H
11 
12 #include "Cursor.h"
13 
14 #include <casacore/casa/Arrays/Array.h>
15 
16 namespace dp3 {
17 namespace base {
18 
19 template <typename T>
20 cursor<T> casa_cursor(casacore::Array<T> &array) {
21  return cursor<T>(array.data(), array.ndim(), array.steps().storage());
22 }
23 
24 template <typename T>
25 const_cursor<T> casa_const_cursor(const casacore::Array<T> &array) {
26  return const_cursor<T>(array.data(), array.ndim(), array.steps().storage());
27 }
28 
29 } // namespace base
30 } // namespace dp3
31 
32 #endif
Definition: Cursor.h:97
Multi-dimensional iterators.
Definition: Cursor.h:20
cursor< T > casa_cursor(casacore::Array< T > &array)
Definition: CursorUtilCasa.h:20
const_cursor< T > casa_const_cursor(const casacore::Array< T > &array)
Definition: CursorUtilCasa.h:25
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53