mirror of
https://github.com/MartinOpat/cuda-based-raytrace.git
synced 2025-06-07 02:13:10 +02:00
comments
This commit is contained in:
1 parent
2c7ea3f624
commit
dbebb6d9f2
8 files changed
+117
-13
No files matched your search
@@ -8,17 +8,42 @@
|
||||
#include "filepathmanager.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief Simple wrapper around all the NetCDF functionality.
|
||||
*/
|
||||
class DataReader {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor.
|
||||
* @param path Path to the directory containing all the .nc4 files.
|
||||
* @param variableName The variable we are interested in.
|
||||
*/
|
||||
DataReader(const std::string &path, std::string variableName);
|
||||
|
||||
/**
|
||||
* @brief The length of the flat data in variableName.
|
||||
* Used for allocating the right amount of memory.
|
||||
*/
|
||||
size_t fileLength(size_t fileIndex);
|
||||
|
||||
/**
|
||||
* @brief Write all the data in file fileIndex of variable we re interested in into the dataOut.
|
||||
*/
|
||||
template <typename T>
|
||||
void loadFile(T* dataOut, size_t fileIndex);
|
||||
|
||||
/**
|
||||
* @brief Write all the data in file fileIndex of variable variableName into the dataOut.
|
||||
* @param dataOut pointer to memory that should be written to.
|
||||
* @param fileIndex the index of the file we want to load into memory.
|
||||
* @param variableName the name of the variable
|
||||
*/
|
||||
template <typename T>
|
||||
void loadFile(T* dataOut, size_t fileIndex, const std::string& variableName);
|
||||
|
||||
/**
|
||||
* @brief Get size of a variable.
|
||||
*/
|
||||
size_t axisLength(size_t fileIndex, const std::string& axisName);
|
||||
|
||||
~DataReader();
|
||||
|
||||