ARTS  2.4.0(git:4fb77825)
test_matpack_simple.cc
Go to the documentation of this file.
1 /* Copyright (C) 2019 Oliver Lemke <oliver.lemke@uni-hamburg.de>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
18 #include <algorithm>
19 #include <cmath>
20 #include <cstdlib>
21 #include <iostream>
22 #include "matpackVII.h"
23 
24 // Simple element access operator benchmark
25 void test1() {
26  Matrix m(500, 500);
27  for (Index k = 0; k < 1000; k++)
28  for (Index i = 0; i < m.nrows(); i++)
29  for (Index j = 0; j < m.ncols(); j++) m(i, j) = 2.;
30 }
31 
32 int main() {
33  test1();
34 
35  return 0;
36 }
Matrix
The Matrix class.
Definition: matpackI.h:1193
ConstMatrixView::nrows
Index nrows() const
Returns the number of rows.
Definition: matpackI.cc:429
ConstMatrixView::ncols
Index ncols() const
Returns the number of columns.
Definition: matpackI.cc:432
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
test1
void test1()
Definition: test_matpack_simple.cc:25
main
int main()
Definition: test_matpack_simple.cc:32
matpackVII.h