Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/tool/pps/pps_counter.cc
7132 views
1
/*
2
* Copyright © 2019-2020 Collabora, Ltd.
3
* Author: Antonio Caggiano <[email protected]>
4
* Author: Rohan Garg <[email protected]>
5
* Author: Robert Beckett <[email protected]>
6
*
7
* SPDX-License-Identifier: MIT
8
*/
9
10
#include "pps_counter.h"
11
12
#include <cassert>
13
#include <cstring>
14
15
#include "pps_algorithm.h"
16
17
namespace pps
18
{
19
Counter::Counter(int32_t id, const std::string &name, int32_t group)
20
: id {id}
21
, name {name}
22
, group {group}
23
{
24
assert(id >= 0 && "Invalid counter ID");
25
assert(group >= 0 && "Invalid group ID");
26
}
27
28
bool Counter::operator==(const Counter &other) const
29
{
30
return id == other.id;
31
}
32
33
} // namespace pps
34
35