GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/options/resource_manager_options.cpp Lines: 11 31 35.5 %
Date: 2021-05-22 Branches: 2 4 50.0 %

Line Exec Source
1
/******************************************************************************
2
 * Top contributors (to current version):
3
 *   Mathias Preiner, Aina Niemetz
4
 *
5
 * This file is part of the cvc5 project.
6
 *
7
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 * in the top-level source directory and their institutional affiliations.
9
 * All rights reserved.  See the file COPYING in the top-level source
10
 * directory for licensing information.
11
 * ****************************************************************************
12
 *
13
 * Option template for option modules.
14
 *
15
 * For each <module>_options.toml configuration file, mkoptions.py
16
 * expands this template and generates a <module>_options.cpp file.
17
 */
18
#include "options/resource_manager_options.h"
19
20
#include <iostream>
21
22
#include "base/check.h"
23
#include "options/option_exception.h"
24
25
// clang-format off
26
namespace cvc5 {
27
28
template <> options::resourceWeightHolder__option_t::type& Options::ref(
29
    options::resourceWeightHolder__option_t)
30
{
31
    return resman().resourceWeightHolder;
32
}
33
10094
template <> const options::resourceWeightHolder__option_t::type& Options::operator[](
34
    options::resourceWeightHolder__option_t) const
35
{
36
10094
  return resman().resourceWeightHolder;
37
}
38
template <> bool Options::wasSetByUser(options::resourceWeightHolder__option_t) const
39
{
40
  return resman().resourceWeightHolder__setByUser__;
41
}
42
template <> options::perCallResourceLimit__option_t::type& Options::ref(
43
    options::perCallResourceLimit__option_t)
44
{
45
    return resman().perCallResourceLimit;
46
}
47
104153101
template <> const options::perCallResourceLimit__option_t::type& Options::operator[](
48
    options::perCallResourceLimit__option_t) const
49
{
50
104153101
  return resman().perCallResourceLimit;
51
}
52
template <> bool Options::wasSetByUser(options::perCallResourceLimit__option_t) const
53
{
54
  return resman().perCallResourceLimit__setByUser__;
55
}
56
template <> options::cumulativeResourceLimit__option_t::type& Options::ref(
57
    options::cumulativeResourceLimit__option_t)
58
{
59
    return resman().cumulativeResourceLimit;
60
}
61
104153101
template <> const options::cumulativeResourceLimit__option_t::type& Options::operator[](
62
    options::cumulativeResourceLimit__option_t) const
63
{
64
104153101
  return resman().cumulativeResourceLimit;
65
}
66
template <> bool Options::wasSetByUser(options::cumulativeResourceLimit__option_t) const
67
{
68
  return resman().cumulativeResourceLimit__setByUser__;
69
}
70
template <> options::perCallMillisecondLimit__option_t::type& Options::ref(
71
    options::perCallMillisecondLimit__option_t)
72
{
73
    return resman().perCallMillisecondLimit;
74
}
75
104153101
template <> const options::perCallMillisecondLimit__option_t::type& Options::operator[](
76
    options::perCallMillisecondLimit__option_t) const
77
{
78
104153101
  return resman().perCallMillisecondLimit;
79
}
80
template <> bool Options::wasSetByUser(options::perCallMillisecondLimit__option_t) const
81
{
82
  return resman().perCallMillisecondLimit__setByUser__;
83
}
84
template <> options::cumulativeMillisecondLimit__option_t::type& Options::ref(
85
    options::cumulativeMillisecondLimit__option_t)
86
{
87
    return resman().cumulativeMillisecondLimit;
88
}
89
5879
template <> const options::cumulativeMillisecondLimit__option_t::type& Options::operator[](
90
    options::cumulativeMillisecondLimit__option_t) const
91
{
92
5879
  return resman().cumulativeMillisecondLimit;
93
}
94
template <> bool Options::wasSetByUser(options::cumulativeMillisecondLimit__option_t) const
95
{
96
  return resman().cumulativeMillisecondLimit__setByUser__;
97
}
98
99
namespace options {
100
101
thread_local struct resourceWeightHolder__option_t resourceWeightHolder;
102
thread_local struct perCallResourceLimit__option_t perCallResourceLimit;
103
thread_local struct cumulativeResourceLimit__option_t cumulativeResourceLimit;
104
thread_local struct perCallMillisecondLimit__option_t perCallMillisecondLimit;
105
thread_local struct cumulativeMillisecondLimit__option_t cumulativeMillisecondLimit;
106
107
108
109
}  // namespace options
110
28194
}  // namespace cvc5
111
// clang-format on