Linux GNU 11.4.0 Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 0 / 1
Functions: -% 0 / 1 / 1
Branches: 50.0% 1 / 0 / 2

OMCompiler/SimulationRuntime/c/util/index_spec.h
Line Branch Exec Source
1 /*
2 * This file belongs to the OpenModelica Run-Time System
3 *
4 * Copyright (c) 1998-2026, Open Source Modelica Consortium (OSMC), c/o Linköpings
5 * universitet, Department of Computer and Information Science, SE-58183 Linköping, Sweden. All rights
6 * reserved.
7 *
8 * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE
9 * AGPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.8. ANY
10 * USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S
11 * ACCEPTANCE OF THE BSD NEW LICENSE OR THE OSMC PUBLIC LICENSE OR THE AGPL
12 * VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
13 *
14 * The OpenModelica software and the OSMC (Open Source Modelica Consortium) Public License
15 * (OSMC-PL) are obtained from OSMC, either from the above address, from the URLs:
16 * http://www.openmodelica.org or https://github.com/OpenModelica/ or
17 * http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica distribution. GNU
18 * AGPL version 3 is obtained from: https://www.gnu.org/licenses/licenses.html#GPL. The BSD NEW
19 * License is obtained from: http://www.opensource.org/licenses/BSD-3-Clause.
20 *
21 * This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY
23 * SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF
24 * OSMC-PL.
25 *
26 */
27
28 #ifndef INDEX_SPEC_H_
29 #define INDEX_SPEC_H_
30
31 #include "../openmodelica.h"
32
33 extern int index_spec_ok(const index_spec_t* s);
34 extern void alloc_index_spec(index_spec_t* s);
35 extern void create_index_spec(index_spec_t* dest, int nridx, ...);
36 extern _index_t* make_index_array(int nridx,...);
37 extern void omc_index_spec_release(index_spec_t* s);
38 static inline int imax(int i, int j)
39
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 125684 times.
407742 { return ((i < j) ? j : i); }
40 extern int next_index(int ndims, _index_t* idx, const _index_t* size);
41
42 extern void print_index_spec(const index_spec_t* spec);
43 extern void print_size_array(int size, const size_t* arr);
44
45 #endif
46