mirror of
https://github.com/MartinOpat/cuda-based-raytrace.git
synced 2025-06-07 02:13:10 +02:00
still need to modify datareader to use netcdf on only one thread
This commit is contained in:
1 parent
a7ad248c38
commit
7b3c87c656
11 files changed
+487
-77
No files matched your search
@@ -1,24 +1,31 @@
|
||||
#ifndef GPUBUFFER_H
|
||||
#define GPUBUFFER_H
|
||||
|
||||
#include "fielddata.h"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <experimental/propagate_const>
|
||||
|
||||
#include "datareader.h"
|
||||
|
||||
struct DataHandle {
|
||||
float *d_data;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
class GPUBuffer {
|
||||
public:
|
||||
GPUBuffer(std::string path, std::string variableName);
|
||||
static constexpr size_t numBufferedFiles = 3;
|
||||
|
||||
FieldData nextFieldData();
|
||||
GPUBuffer(DataReader& dataReader);
|
||||
|
||||
void loadFile(size_t fileIndex, size_t bufferIndex); // Async call
|
||||
|
||||
DataHandle getDataHandle(size_t bufferIndex); // Potentially blocking
|
||||
|
||||
~GPUBuffer();
|
||||
|
||||
FieldMetadata *fmd;
|
||||
private:
|
||||
// TODO: Implement GPUBuffer
|
||||
std::string path;
|
||||
std::string variableName;
|
||||
|
||||
class impl;
|
||||
std::experimental::propagate_const<std::unique_ptr<impl>> pImpl;
|
||||
};
|
||||
|
||||
#endif //GPUBUFFER_H
|
||||