Conversation
|
|
||
| //////////////////////////////////////////////////////////////////////////////// | ||
| template <typename T, int n> | ||
| struct DataBundle { |
There was a problem hiding this comment.
Why not put DataBundle in a header file in the include directory?
There was a problem hiding this comment.
We could, but I want the idea to be that the memory utilities work with any bundle-esque class, where DataBundle is one example.
There was a problem hiding this comment.
I like the plan to make the memory utilities generic, but I still think providing this bundle class in a separate header would be useful.
DirectProgramming/DPC++FPGA/Tutorials/DesignPatterns/data_bundle/src/data_bundle.cpp
Outdated
Show resolved
Hide resolved
| class USMProducerID; | ||
| class USMConsumerID; | ||
|
|
||
| event SubmitBufferProducer(queue &q, buffer<int, 1> &in_buf, size_t count) { |
There was a problem hiding this comment.
Should we also encapsulate these producers/consumers into a shared header? Don't you already have this in the FakeIOPipes?
There was a problem hiding this comment.
I was trying to avoid having anything about SYCL queues in the shared header files.
There was a problem hiding this comment.
Do you think that's an important goal? I think if it's generically useful, which this clearly is, we should try to put it into the include directory. Maybe we isolate it into a special sub-directory?
There was a problem hiding this comment.
I see them as orthogonal, but I understand the confusion because of what I named this project.
I think we should have a generic "bundle" class that has operator[] semantics, but that didn't end up being my goal here (despite the name, sorry).
The goal here is to make the MemoryToPipe and PipeToMemory, and don't think these methods should depend on a specific bundle type.
There was a problem hiding this comment.
Wow. Early monday. My response makes no sense.
I have no problem throwing the actual kernels into the file, but I kind of like the user having to wrap all of our utilities in kernels. That way they know what they are submitting.
| } | ||
|
|
||
| template<typename Pipe, typename PtrT> | ||
| void StreamToPipe(PtrT out_ptr, size_t count_div_elements_per_cycle) { |
There was a problem hiding this comment.
Shouldn't this be called PipeToMemory?
There was a problem hiding this comment.
Ya. I messed up. Not too worried about names right now.
whitepau
left a comment
There was a problem hiding this comment.
The readme doesn't contain any info about using data_bundle to pass data in parallel through a pipe; I think that deserves a shout-out.
|
|
||
|
|
||
| ## Purpose | ||
| This tutorial demonstrates how a kernel in a DPC++ FPGA program transfers |
There was a problem hiding this comment.
| This tutorial demonstrates how a kernel in a DPC++ FPGA program transfers | |
| This tutorial demonstrates how a kernel in a DPC++ FPGA program streams |
I would like to lean on the idea that pipes are streams. particularly with an eye to IP Authoring.
No description provided.