root/software/read_test/src/URingExecDriver.h @ 3599f0a5
| ef18eb33 | David Sorber | /********************************************************************
|
||
* This software is "commercial computer software" as defined in the *
|
||||
* Federal Acquisition Regulations and is subject to BlackLynx *
|
||||
* Inc's standard End User License Agreement. *
|
||||
* *
|
||||
* CONFIDENTIAL - All source code is the propriety and confidential *
|
||||
* information of BlackLynx Inc. *
|
||||
* *
|
||||
* Copyright 2022 BlackLynx Inc. *
|
||||
* Unpublished -- all rights reserved under the copyright laws *
|
||||
* of the United States. *
|
||||
********************************************************************/
|
||||
#ifndef __BLACKLYNX_URING_EXECDRIVER_H__
|
||||
#define __BLACKLYNX_URING_EXECDRIVER_H__
|
||||
| f12339cf | david.sorber | #include <atomic>
|
||
| ef18eb33 | David Sorber | #include <cstdint>
|
||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
| 864b608c | David Sorber | #include "liburing.h"
|
||
| ef18eb33 | David Sorber | #include "Chunk.h"
|
||
#include "ExecDriver.h"
|
||||
| f12339cf | david.sorber | #include "Utilities/ProtectedQueue.h"
|
||
| ef18eb33 | David Sorber | |||
namespace BlackLynx
|
||||
{
|
||||
namespace SearchLynx
|
||||
{
|
||||
class URingExecDriver : public ExecDriver
|
||||
{
|
||||
public:
|
||||
| 864b608c | David Sorber | static const uint32_t QUEUE_DEPTH = 256;
|
||
| ef18eb33 | David Sorber | URingExecDriver(
|
||
const std::string& inputFile,
|
||||
| f12339cf | david.sorber | uint32_t numReaderThreads,
|
||
uint32_t chunkSize);
|
||||
| ef18eb33 | David Sorber | |||
~URingExecDriver() override;
|
||||
void start() override;
|
||||
private:
|
||||
void readerThreadBody(
|
||||
chunk_queue_t* inQueue,
|
||||
chunk_queue_t* outQueue) override;
|
||||
| 3dda5d70 | david.sorber | void waitForCompletion(
|
||
struct io_uring* ring,
|
||||
std::atomic<uint32_t>& ioCounter,
|
||||
chunk_queue_t* outQueue);
|
||||
| 864b608c | David Sorber | |||
| ef18eb33 | David Sorber | };
|
||
}
|
||||
}
|
||||
#endif // __BLACKLYNX_URING_EXECDRIVER_H__
|