ARTS 2.5.4 (git: 31ce4f0e)
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
25void 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
32int main() {
33 test1();
34
35 return 0;
36}
Index nrows() const noexcept
Definition: matpackI.h:1055
Index ncols() const noexcept
Definition: matpackI.h:1056
The Matrix class.
Definition: matpackI.h:1261
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
constexpr Numeric k
Boltzmann constant convenience name [J/K].
void test1()
int main()