still need to modify datareader to use netcdf on only one thread

This commit is contained in:
Robin committed 2024-12-23 20:48:00 +01:00
1 parent a7ad248c38
commit 7b3c87c656
11 files changed
+487 -77

No files matched your search

+17 -10
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.