Restructure project sources.
This commit is contained in:
41
src/fmri/LayerData.hpp
Normal file
41
src/fmri/LayerData.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "utils.hpp"
|
||||
|
||||
namespace fmri
|
||||
{
|
||||
|
||||
using std::ostream;
|
||||
using std::string;
|
||||
using std::string_view;
|
||||
using std::unique_ptr;
|
||||
using std::vector;
|
||||
|
||||
class LayerData
|
||||
{
|
||||
public:
|
||||
LayerData(const string &name, const vector<int> &shape, const DType *data);
|
||||
LayerData(const LayerData &) = delete;
|
||||
|
||||
LayerData(LayerData &&) = default;
|
||||
LayerData &operator=(const LayerData &) = delete;
|
||||
LayerData &operator=(LayerData &&) = default;
|
||||
|
||||
const string &name() const;
|
||||
const vector<int> &shape() const;
|
||||
DType const *data() const;
|
||||
size_t numEntries() const;
|
||||
private:
|
||||
string name_;
|
||||
vector<int> shape_;
|
||||
unique_ptr<DType[]> data_;
|
||||
};
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream&, const fmri::LayerData&);
|
||||
Reference in New Issue
Block a user