-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot convert ‘Message*’ to ‘rigtorp::mpmc::Slot<Message>*’ #30
Comments
For completeness, the data structure class Message
{
public:
uint32_t destination;
uint32_t source;
uint32_t process;
uint32_t tag;
MessageType type; // This is just an enum
MessageDirection direction; // an enum too
uint32_t size;
void* data;
// constructor
Message(uint32_t host, uint32_t process, uint32_t tag, MessageType type, MessageDirection direction,
uint32_t size, void* data);
// constructor
Message(uint32_t source, uint32_t process, uint32_t tag, MessageType type);
}; |
Allocator needs to be supplied like this:
template <typename T,
typename Allocator = mpmc::AlignedAllocator<mpmc::Slot<T>>>
using MPMCQueue = mpmc::Queue<T, Allocator>;
…On Fri, Jul 30, 2021 at 4:28 PM Mohammad Ewais ***@***.***> wrote:
For completeness, the data structure Message is as follows:
class Message
{
public:
uint32_t destination;
uint32_t source;
uint32_t process;
uint32_t tag;
MessageType type; // This is just an enum
MessageDirection direction; // an enum too
uint32_t size;
void* data;
// constructor
Message(uint32_t host, uint32_t process, uint32_t tag, MessageType type, MessageDirection direction,
uint32_t size, void* data);
// constructor
Message(uint32_t source, uint32_t process, uint32_t tag, MessageType type);
};
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLO25YG2YR7TOTZLXZSSTT2KZKLANCNFSM5BH7QMZQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I am trying to use MPMCQueue with a custom allocator. But I am getting the two following errors:
This is how I define the allocator and pass it to MPMCQueue:
Then inside one of my classes I actually use it like so:
comm_mqueue<Message> downward_queue{20};
I don't actually use the queues yet (so no pushing or popping), I am getting these errors directly from this simple use.
Is there something I am missing or is this a bug?I am using Linux, gcc/g++ 11.1.0, and this is being compiled as C++17.
The text was updated successfully, but these errors were encountered: