2025-10-30 14:26:27 -04:00
|
|
|
#include "stagingBuffer.h"
|
2025-11-07 22:05:01 -04:00
|
|
|
#include <unistd.h>
|
2025-10-30 14:26:27 -04:00
|
|
|
|
|
|
|
|
namespace smo {
|
|
|
|
|
namespace stim_buff {
|
|
|
|
|
|
2025-10-30 17:53:58 -04:00
|
|
|
// Static defaults for io_uring
|
2025-11-07 22:05:01 -04:00
|
|
|
const StagingBuffer::IOEngineConstraints
|
|
|
|
|
StagingBuffer::IOEngineConstraints::ioUringConstraints(
|
|
|
|
|
static_cast<size_t>(sysconf(_SC_PAGE_SIZE)), // slotStartAlignmentByteVal (page alignment for DMA)
|
2025-10-30 17:53:58 -04:00
|
|
|
1472 // slotPadToNBytes (MTU 1500 - UDP/IP header 28)
|
|
|
|
|
);
|
2025-10-30 14:26:27 -04:00
|
|
|
|
2025-11-07 22:05:01 -04:00
|
|
|
// Static defaults for OpenCL input
|
|
|
|
|
const StagingBuffer::IOEngineConstraints
|
|
|
|
|
StagingBuffer::IOEngineConstraints::openClInputConstraints(
|
|
|
|
|
static_cast<size_t>(sysconf(_SC_PAGE_SIZE)), // slotStartAlignmentByteVal (page alignment)
|
|
|
|
|
sizeof(void *) // slotPadToNBytes (pointer size)
|
|
|
|
|
);
|
|
|
|
|
|
2025-10-30 14:26:27 -04:00
|
|
|
} // namespace stim_buff
|
|
|
|
|
} // namespace smo
|