mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Implement bulk callbacks for unmanaged regions
This commit is contained in:
@@ -217,45 +217,17 @@ class FairMQDevice
|
||||
}
|
||||
|
||||
// creates unamanaged region with the default device transport
|
||||
FairMQUnmanagedRegionPtr NewUnmanagedRegion(const size_t size,
|
||||
FairMQRegionCallback callback = nullptr,
|
||||
const std::string& path = "",
|
||||
int flags = 0)
|
||||
template<typename... Args>
|
||||
FairMQUnmanagedRegionPtr NewUnmanagedRegion(Args&&... args)
|
||||
{
|
||||
return Transport()->CreateUnmanagedRegion(size, callback, path, flags);
|
||||
}
|
||||
|
||||
// creates unamanaged region with the default device transport
|
||||
FairMQUnmanagedRegionPtr NewUnmanagedRegion(const size_t size,
|
||||
const int64_t userFlags,
|
||||
FairMQRegionCallback callback = nullptr,
|
||||
const std::string& path = "",
|
||||
int flags = 0)
|
||||
{
|
||||
return Transport()->CreateUnmanagedRegion(size, userFlags, callback, path, flags);
|
||||
return Transport()->CreateUnmanagedRegion(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
// creates unmanaged region with the transport of the specified channel
|
||||
FairMQUnmanagedRegionPtr NewUnmanagedRegionFor(const std::string& channel,
|
||||
int index,
|
||||
const size_t size,
|
||||
FairMQRegionCallback callback = nullptr,
|
||||
const std::string& path = "",
|
||||
int flags = 0)
|
||||
template<typename... Args>
|
||||
FairMQUnmanagedRegionPtr NewUnmanagedRegionFor(const std::string& channel, int index, Args&&... args)
|
||||
{
|
||||
return GetChannel(channel, index).NewUnmanagedRegion(size, callback, path, flags);
|
||||
}
|
||||
|
||||
// creates unmanaged region with the transport of the specified channel
|
||||
FairMQUnmanagedRegionPtr NewUnmanagedRegionFor(const std::string& channel,
|
||||
int index,
|
||||
const size_t size,
|
||||
const int64_t userFlags,
|
||||
FairMQRegionCallback callback = nullptr,
|
||||
const std::string& path = "",
|
||||
int flags = 0)
|
||||
{
|
||||
return GetChannel(channel, index).NewUnmanagedRegion(size, userFlags, callback, path, flags);
|
||||
return GetChannel(channel, index).NewUnmanagedRegion(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template<typename ...Ts>
|
||||
|
Reference in New Issue
Block a user