Project
Loading...
Searching...
No Matches
CTFIOSize.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
14#ifndef ALICEO2_CTFIO_SIZE_H
15#define ALICEO2_CTFIO_SIZE_H
16
17#include "GPUCommonRtypes.h"
18#include <string>
19
20namespace o2::ctf
21{
22struct CTFIOSize {
23 size_t rawIn = 0; // input size to compression
24 size_t ctfIn = 0; // input size to entropy encoding
25 size_t ctfOut = 0; // encoded output
26
27 bool operator==(const CTFIOSize& other) const { return (rawIn == other.rawIn) && (ctfIn == other.ctfIn) && (ctfOut == other.ctfOut); }
28 bool operator!=(const CTFIOSize& other) const { return (rawIn != other.rawIn) || (ctfIn != other.ctfIn) || (ctfOut != other.ctfOut); }
29 CTFIOSize operator+(const CTFIOSize& other) const { return {rawIn + other.rawIn, ctfIn + other.ctfIn, ctfOut + other.ctfOut}; }
30 CTFIOSize operator-(const CTFIOSize& other) const { return {rawIn - other.rawIn, ctfIn + other.ctfIn, ctfOut - other.ctfOut}; }
31
33 {
34 rawIn += other.rawIn;
35 ctfIn += other.ctfIn;
36 ctfOut += other.ctfOut;
37 return *this;
38 }
39
41 {
42 rawIn -= other.rawIn;
43 ctfIn -= other.ctfIn;
44 ctfOut -= other.ctfOut;
45 return *this;
46 }
47
48 std::string asString() const;
49
51};
52
53} // namespace o2::ctf
54
55#endif
pair of input and output size
Definition ANSHeader.h:25
bool operator!=(const CTFIOSize &other) const
Definition CTFIOSize.h:28
bool operator==(const CTFIOSize &other) const
Definition CTFIOSize.h:27
ClassDefNV(CTFIOSize, 1)
std::string asString() const
Definition CTFIOSize.cxx:19
CTFIOSize & operator+=(const CTFIOSize &other)
Definition CTFIOSize.h:32
CTFIOSize operator+(const CTFIOSize &other) const
Definition CTFIOSize.h:29
CTFIOSize operator-(const CTFIOSize &other) const
Definition CTFIOSize.h:30
CTFIOSize & operator-=(const CTFIOSize &other)
Definition CTFIOSize.h:40
VectorOfTObjectPtrs other