mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Apply modernize-use-default-member-init
This commit is contained in:
parent
e1b229522c
commit
acf63d3c1b
|
@ -16,15 +16,12 @@ namespace bpo = boost::program_options;
|
|||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
// register a handler for data arriving on "data" channel
|
||||
OnData("data", &Sink::HandleData);
|
||||
|
@ -46,8 +44,8 @@ class Sink : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -18,15 +18,12 @@ namespace bpo = boost::program_options;
|
|||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
// register a handler for data arriving on "data2" channel
|
||||
OnData("data2", &Sink::HandleData);
|
||||
|
@ -45,8 +43,8 @@ class Sink : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -18,12 +18,7 @@ namespace bpo = boost::program_options;
|
|||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fNumDataChannels(0)
|
||||
, fCounter(0)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
|
@ -56,10 +51,10 @@ class Sampler : public FairMQDevice
|
|||
}
|
||||
|
||||
|
||||
int fNumDataChannels;
|
||||
uint64_t fCounter;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
int fNumDataChannels = 0;
|
||||
uint64_t fCounter = 0;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
OnData("data", &Sink::HandleData);
|
||||
}
|
||||
|
@ -44,8 +42,8 @@ class Sink : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -17,8 +17,6 @@ class Sampler : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fIterations(0)
|
||||
, fCounter(0)
|
||||
{}
|
||||
|
||||
void InitTask() override
|
||||
|
@ -53,8 +51,8 @@ class Sampler : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fIterations;
|
||||
uint64_t fCounter;
|
||||
uint64_t fIterations = 0;
|
||||
uint64_t fCounter = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Sink()
|
||||
: fIterations(0)
|
||||
, fCounter(0)
|
||||
{
|
||||
OnData("data2", &Sink::HandleData);
|
||||
}
|
||||
|
@ -45,8 +43,8 @@ class Sink : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fIterations;
|
||||
uint64_t fCounter;
|
||||
uint64_t fIterations = 0;
|
||||
uint64_t fCounter = 0;
|
||||
};
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
{
|
||||
|
|
|
@ -20,10 +20,7 @@ namespace bpo = boost::program_options;
|
|||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(5)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
|
@ -81,8 +78,8 @@ class Sampler : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 5;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -19,10 +19,7 @@ namespace bpo = boost::program_options;
|
|||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
@ -64,8 +61,8 @@ class Sampler : public FairMQDevice
|
|||
|
||||
protected:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -18,10 +18,6 @@ class Sink : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Sink()
|
||||
: fReceivedData(false)
|
||||
, fReceivedBroadcast(false)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
OnData("broadcast", &Sink::HandleBroadcast);
|
||||
OnData("data", &Sink::HandleData);
|
||||
|
@ -61,10 +57,10 @@ class Sink : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
bool fReceivedData;
|
||||
bool fReceivedBroadcast;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
bool fReceivedData = false;
|
||||
bool fReceivedBroadcast = false;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -16,11 +16,7 @@ namespace bpo = boost::program_options;
|
|||
class Sampler1 : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler1()
|
||||
: fAckListener()
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler1() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
|
@ -73,8 +69,8 @@ class Sampler1 : public FairMQDevice
|
|||
}
|
||||
|
||||
std::thread fAckListener;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -16,10 +16,7 @@ namespace bpo = boost::program_options;
|
|||
class Sampler2 : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler2()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler2() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
|
@ -47,8 +44,8 @@ class Sampler2 : public FairMQDevice
|
|||
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -15,9 +15,6 @@ class Sink : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations1(0)
|
||||
, fNumIterations2(0)
|
||||
{
|
||||
// register a handler for data arriving on "data" channel
|
||||
OnData("data1", &Sink::HandleData1);
|
||||
|
@ -65,9 +62,9 @@ class Sink : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations1;
|
||||
uint64_t fNumIterations2;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations1 = 0;
|
||||
uint64_t fNumIterations2 = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -33,12 +33,6 @@ class Receiver : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Receiver()
|
||||
: fBuffer()
|
||||
, fDiscardedSet()
|
||||
, fNumSenders(0)
|
||||
, fBufferTimeoutInMs(5000)
|
||||
, fMaxTimeframes(0)
|
||||
, fTimeframeCounter(0)
|
||||
{
|
||||
OnData("data", &Receiver::HandleData);
|
||||
}
|
||||
|
@ -102,10 +96,10 @@ class Receiver : public FairMQDevice
|
|||
unordered_map<uint16_t, TFBuffer> fBuffer;
|
||||
unordered_set<uint16_t> fDiscardedSet;
|
||||
|
||||
int fNumSenders;
|
||||
int fBufferTimeoutInMs;
|
||||
int fMaxTimeframes;
|
||||
int fTimeframeCounter;
|
||||
int fNumSenders = 0;
|
||||
int fBufferTimeoutInMs = 5000;
|
||||
int fMaxTimeframes = 0;
|
||||
int fTimeframeCounter = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -20,15 +20,8 @@ namespace bpo = boost::program_options;
|
|||
class Sender : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sender()
|
||||
: fNumReceivers(0)
|
||||
, fIndex(0)
|
||||
, fSubtimeframeSize(10000)
|
||||
{}
|
||||
Sender() {}
|
||||
|
||||
~Sender() = default;
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
fIndex = GetConfig()->GetProperty<int>("sender-index");
|
||||
|
@ -64,9 +57,9 @@ class Sender : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
int fNumReceivers;
|
||||
unsigned int fIndex;
|
||||
int fSubtimeframeSize;
|
||||
int fNumReceivers = 0;
|
||||
unsigned int fIndex = 0;
|
||||
int fSubtimeframeSize = 10000;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -18,12 +18,8 @@ namespace bpo = boost::program_options;
|
|||
class Synchronizer : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Synchronizer()
|
||||
: fTimeframeId(0)
|
||||
{}
|
||||
~Synchronizer() = default;
|
||||
Synchronizer() {}
|
||||
|
||||
protected:
|
||||
bool ConditionalRun() override
|
||||
{
|
||||
FairMQMessagePtr msg(NewSimpleMessage(fTimeframeId));
|
||||
|
@ -39,7 +35,7 @@ class Synchronizer : public FairMQDevice
|
|||
return true;
|
||||
}
|
||||
|
||||
uint16_t fTimeframeId;
|
||||
uint16_t fTimeframeId = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& /* options */) {}
|
||||
|
|
|
@ -18,15 +18,8 @@ namespace bpo = boost::program_options;
|
|||
class Readout : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Readout()
|
||||
: fMsgSize(10000)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
, fRegion(nullptr)
|
||||
, fNumUnackedMsgs(0)
|
||||
{}
|
||||
Readout() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
fMsgSize = fConfig->GetProperty<int>("msg-size");
|
||||
|
@ -65,6 +58,7 @@ class Readout : public FairMQDevice
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ResetTask() override
|
||||
{
|
||||
// if not all messages acknowledged, wait for a bit. But only once, since receiver could be already dead.
|
||||
|
@ -77,11 +71,11 @@ class Readout : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
int fMsgSize;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
FairMQUnmanagedRegionPtr fRegion;
|
||||
std::atomic<uint64_t> fNumUnackedMsgs;
|
||||
int fMsgSize = 10000;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
FairMQUnmanagedRegionPtr fRegion = nullptr;
|
||||
std::atomic<uint64_t> fNumUnackedMsgs = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -14,12 +14,8 @@ namespace bpo = boost::program_options;
|
|||
class Receiver : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Receiver()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Receiver() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
// Get the fMaxIterations value from the command line options (via fConfig)
|
||||
|
@ -43,8 +39,8 @@ class Receiver : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -16,9 +16,7 @@ namespace bpo = boost::program_options;
|
|||
class Sender : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sender()
|
||||
: fInputChannelName()
|
||||
{}
|
||||
Sender() {}
|
||||
|
||||
void Init() override
|
||||
{
|
||||
|
|
|
@ -18,16 +18,8 @@ namespace bpo = boost::program_options;
|
|||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMsgSize(10000)
|
||||
, fLinger(100)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
, fRegion(nullptr)
|
||||
, fNumUnackedMsgs(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
fMsgSize = fConfig->GetProperty<int>("msg-size");
|
||||
|
@ -102,13 +94,13 @@ class Sampler : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
int fMsgSize;
|
||||
uint32_t fLinger;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
FairMQUnmanagedRegionPtr fRegion;
|
||||
int fMsgSize = 10000;
|
||||
uint32_t fLinger = 100;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
FairMQUnmanagedRegionPtr fRegion = nullptr;
|
||||
std::mutex fMtx;
|
||||
uint64_t fNumUnackedMsgs;
|
||||
uint64_t fNumUnackedMsgs = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -14,10 +14,7 @@ namespace bpo = boost::program_options;
|
|||
class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sink() {}
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
@ -56,8 +53,8 @@ class Sink : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -18,10 +18,7 @@ namespace bpo = boost::program_options;
|
|||
class Client : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Client()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Client() {}
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
@ -66,8 +63,8 @@ class Client : public FairMQDevice
|
|||
|
||||
private:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -17,13 +17,10 @@ class Server : public FairMQDevice
|
|||
{
|
||||
public:
|
||||
Server()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
OnData("data", &Server::HandleData);
|
||||
}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
// Get the fMaxIterations value from the command line options (via fConfig)
|
||||
|
@ -56,8 +53,8 @@ class Server : public FairMQDevice
|
|||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
|
|
@ -27,14 +27,7 @@ enum class FairMQRegionEvent : int
|
|||
|
||||
struct FairMQRegionInfo
|
||||
{
|
||||
FairMQRegionInfo()
|
||||
: managed(true)
|
||||
, id(0)
|
||||
, ptr(nullptr)
|
||||
, size(0)
|
||||
, flags(0)
|
||||
, event(FairMQRegionEvent::created)
|
||||
{}
|
||||
FairMQRegionInfo() {}
|
||||
|
||||
FairMQRegionInfo(bool _managed, uint64_t _id, void* _ptr, size_t _size, int64_t _flags, FairMQRegionEvent _event)
|
||||
: managed(_managed)
|
||||
|
@ -45,12 +38,12 @@ struct FairMQRegionInfo
|
|||
, event(_event)
|
||||
{}
|
||||
|
||||
bool managed; // managed/unmanaged
|
||||
uint64_t id; // id of the region
|
||||
void* ptr; // pointer to the start of the region
|
||||
size_t size; // region size
|
||||
int64_t flags; // custom flags set by the creator
|
||||
FairMQRegionEvent event;
|
||||
bool managed = true; // managed/unmanaged
|
||||
uint64_t id = 0; // id of the region
|
||||
void* ptr = nullptr; // pointer to the start of the region
|
||||
size_t size = 0; // region size
|
||||
int64_t flags = 0; // custom flags set by the creator
|
||||
FairMQRegionEvent event = FairMQRegionEvent::created;
|
||||
};
|
||||
|
||||
struct FairMQRegionBlock {
|
||||
|
@ -108,17 +101,16 @@ inline std::ostream& operator<<(std::ostream& os, const FairMQRegionEvent& event
|
|||
namespace fair::mq
|
||||
{
|
||||
|
||||
struct RegionConfig {
|
||||
bool lock;
|
||||
bool zero;
|
||||
|
||||
RegionConfig()
|
||||
: lock(false), zero(false)
|
||||
{}
|
||||
struct RegionConfig
|
||||
{
|
||||
RegionConfig() {}
|
||||
|
||||
RegionConfig(bool l, bool z)
|
||||
: lock(l), zero(z)
|
||||
{}
|
||||
|
||||
bool lock = false;
|
||||
bool zero = false;
|
||||
};
|
||||
|
||||
using RegionCallback = FairMQRegionCallback;
|
||||
|
|
|
@ -29,17 +29,7 @@ namespace fair::mq
|
|||
class BenchmarkSampler : public Device
|
||||
{
|
||||
public:
|
||||
BenchmarkSampler()
|
||||
: fMultipart(false)
|
||||
, fMemSet(false)
|
||||
, fNumParts(1)
|
||||
, fMsgSize(10000)
|
||||
, fMsgAlignment(0)
|
||||
, fMsgRate(0)
|
||||
, fNumIterations(0)
|
||||
, fMaxIterations(0)
|
||||
, fOutChannelName()
|
||||
{}
|
||||
BenchmarkSampler() {}
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
@ -109,14 +99,14 @@ class BenchmarkSampler : public Device
|
|||
}
|
||||
|
||||
protected:
|
||||
bool fMultipart;
|
||||
bool fMemSet;
|
||||
size_t fNumParts;
|
||||
size_t fMsgSize;
|
||||
size_t fMsgAlignment;
|
||||
float fMsgRate;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations;
|
||||
bool fMultipart = false;
|
||||
bool fMemSet = false;
|
||||
size_t fNumParts = 1;
|
||||
size_t fMsgSize = 10000;
|
||||
size_t fMsgAlignment = 0;
|
||||
float fMsgRate = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
uint64_t fMaxIterations = 0;
|
||||
std::string fOutChannelName;
|
||||
};
|
||||
|
||||
|
|
|
@ -23,13 +23,12 @@ class Merger : public Device
|
|||
{
|
||||
public:
|
||||
Merger()
|
||||
: fMultipart(true)
|
||||
, fInChannelName("data-in")
|
||||
: fInChannelName("data-in")
|
||||
, fOutChannelName("data-out")
|
||||
{}
|
||||
|
||||
protected:
|
||||
bool fMultipart;
|
||||
bool fMultipart = true;
|
||||
std::string fInChannelName;
|
||||
std::string fOutChannelName;
|
||||
|
||||
|
|
|
@ -20,16 +20,11 @@ namespace fair::mq
|
|||
class Multiplier : public Device
|
||||
{
|
||||
public:
|
||||
Multiplier()
|
||||
: fMultipart(true)
|
||||
, fNumOutputs(0)
|
||||
, fInChannelName()
|
||||
, fOutChannelNames()
|
||||
{}
|
||||
Multiplier() {}
|
||||
|
||||
protected:
|
||||
bool fMultipart;
|
||||
int fNumOutputs;
|
||||
bool fMultipart = true;
|
||||
int fNumOutputs = 0;
|
||||
std::string fInChannelName;
|
||||
std::vector<std::string> fOutChannelNames;
|
||||
|
||||
|
|
|
@ -19,14 +19,10 @@ namespace fair::mq
|
|||
class Proxy : public Device
|
||||
{
|
||||
public:
|
||||
Proxy()
|
||||
: fMultipart(true)
|
||||
, fInChannelName()
|
||||
, fOutChannelName()
|
||||
{}
|
||||
Proxy() {}
|
||||
|
||||
protected:
|
||||
bool fMultipart;
|
||||
bool fMultipart = true;
|
||||
std::string fInChannelName;
|
||||
std::string fOutChannelName;
|
||||
|
||||
|
|
|
@ -25,22 +25,14 @@ namespace fair::mq
|
|||
class Sink : public Device
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMultipart(false)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
, fMaxFileSize(0)
|
||||
, fBytesWritten(0)
|
||||
, fInChannelName()
|
||||
, fOutFilename()
|
||||
{}
|
||||
Sink() {}
|
||||
|
||||
protected:
|
||||
bool fMultipart;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxFileSize;
|
||||
uint64_t fBytesWritten;
|
||||
bool fMultipart = false;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
uint64_t fMaxFileSize = 0;
|
||||
uint64_t fBytesWritten = 0;
|
||||
std::string fInChannelName;
|
||||
std::string fOutFilename;
|
||||
std::fstream fOutputFile;
|
||||
|
|
|
@ -19,18 +19,12 @@ namespace fair::mq
|
|||
class Splitter : public Device
|
||||
{
|
||||
public:
|
||||
Splitter()
|
||||
: fMultipart(true)
|
||||
, fNumOutputs(0)
|
||||
, fDirection(0)
|
||||
, fInChannelName()
|
||||
, fOutChannelName()
|
||||
{}
|
||||
Splitter() {}
|
||||
|
||||
protected:
|
||||
bool fMultipart;
|
||||
int fNumOutputs;
|
||||
int fDirection;
|
||||
bool fMultipart = true;
|
||||
int fNumOutputs = 0;
|
||||
int fDirection = 0;
|
||||
std::string fInChannelName;
|
||||
std::string fOutChannelName;
|
||||
|
||||
|
|
|
@ -187,11 +187,7 @@ using Uint16MsgDebugMapHashMap = boost::unordered_map<uint16_t, SizetMsgDebugMap
|
|||
|
||||
struct RegionBlock
|
||||
{
|
||||
RegionBlock()
|
||||
: fHandle()
|
||||
, fSize(0)
|
||||
, fHint(0)
|
||||
{}
|
||||
RegionBlock() {}
|
||||
|
||||
RegionBlock(boost::interprocess::managed_shared_memory::handle_t handle, size_t size, size_t hint)
|
||||
: fHandle(handle)
|
||||
|
@ -199,9 +195,9 @@ struct RegionBlock
|
|||
, fHint(hint)
|
||||
{}
|
||||
|
||||
boost::interprocess::managed_shared_memory::handle_t fHandle;
|
||||
size_t fSize;
|
||||
size_t fHint;
|
||||
boost::interprocess::managed_shared_memory::handle_t fHandle{};
|
||||
size_t fSize = 0;
|
||||
size_t fHint = 0;
|
||||
};
|
||||
|
||||
// find id for unique shmem name:
|
||||
|
|
|
@ -35,7 +35,6 @@ class Message final : public fair::mq::Message
|
|||
public:
|
||||
Message(FairMQTransportFactory* factory = nullptr)
|
||||
: fair::mq::Message(factory)
|
||||
, fAlignment(0)
|
||||
, fMsg(std::make_unique<zmq_msg_t>())
|
||||
{
|
||||
if (zmq_msg_init(fMsg.get()) != 0) {
|
||||
|
@ -55,7 +54,6 @@ class Message final : public fair::mq::Message
|
|||
|
||||
Message(const size_t size, FairMQTransportFactory* factory = nullptr)
|
||||
: fair::mq::Message(factory)
|
||||
, fAlignment(0)
|
||||
, fMsg(std::make_unique<zmq_msg_t>())
|
||||
{
|
||||
if (zmq_msg_init_size(fMsg.get(), size) != 0) {
|
||||
|
@ -96,7 +94,6 @@ class Message final : public fair::mq::Message
|
|||
|
||||
Message(void* data, const size_t size, fairmq_free_fn* ffn, void* hint = nullptr, FairMQTransportFactory* factory = nullptr)
|
||||
: fair::mq::Message(factory)
|
||||
, fAlignment(0)
|
||||
, fMsg(std::make_unique<zmq_msg_t>())
|
||||
{
|
||||
if (zmq_msg_init_data(fMsg.get(), data, size, ffn, hint) != 0) {
|
||||
|
@ -106,7 +103,6 @@ class Message final : public fair::mq::Message
|
|||
|
||||
Message(UnmanagedRegionPtr& region, void* data, const size_t size, void* hint = 0, FairMQTransportFactory* factory = nullptr)
|
||||
: fair::mq::Message(factory)
|
||||
, fAlignment(0)
|
||||
, fMsg(std::make_unique<zmq_msg_t>())
|
||||
{
|
||||
if (region->GetType() != GetType()) {
|
||||
|
@ -264,7 +260,7 @@ class Message final : public fair::mq::Message
|
|||
~Message() override { CloseMessage(); }
|
||||
|
||||
private:
|
||||
size_t fAlignment;
|
||||
size_t fAlignment = 0;
|
||||
std::unique_ptr<zmq_msg_t> fMsg;
|
||||
|
||||
zmq_msg_t* GetMessage() const { return fMsg.get(); }
|
||||
|
|
Loading…
Reference in New Issue
Block a user