Skip to content
Snippets Groups Projects
Commit 982bc6c9 authored by Maxence Naud's avatar Maxence Naud
Browse files

change Backend argument type for a std::string

parent 3f6ee54d
No related branches found
No related tags found
2 merge requests!15version 0.2.0,!12Lenetop
Pipeline #42538 passed
#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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment