Skip to content
Snippets Groups Projects

Lenetop

Merged Cyril Moineau requested to merge lenetop into dev
Files
22
#ifndef AIDGE_BACKEND_CUDA_DATA_TENSORIMPL_H_
#define AIDGE_BACKEND_CUDA_DATA_TENSORIMPL_H_
#include <cstddef> // std::size_t
#include <memory>
#include <string>
#include "aidge/backend/TensorImpl.hpp"
#include "aidge/data/Tensor.hpp"
#include "aidge/utils/Registrar.hpp"
@@ -67,10 +71,10 @@ private:
std::unique_ptr<T, decltype(&cudaDelete)> mDataOwner;
public:
static constexpr const char *Backend = "cuda";
static const std::string Backend;
TensorImpl_cuda(DeviceIdx_t device, std::vector<DimSize_t> dims) : TensorImpl(Backend, device, dims), mDataOwner(nullptr, cudaDelete) {}
bool operator==(const TensorImpl &otherImpl) const override final;
@@ -234,6 +238,9 @@ private:
}
};
template <typename T>
const std::string TensorImpl_cuda<T>::Backend = "cuda";
namespace {
static Registrar<Tensor> registrarTensorImpl_cuda_Float64(
{"cuda", DataType::Float64}, Aidge::TensorImpl_cuda<double>::create);
Loading