Skip to content
Snippets Groups Projects
Commit ce1cbb42 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Updated

parent 828e4c1e
No related branches found
No related tags found
1 merge request!4Add Convert operator (a.k.a. Transmitter)
Pipeline #35352 failed
......@@ -128,7 +128,7 @@ class TensorImpl_cuda : public TensorImpl, public TensorImpl_cuda_ {
CHECK_CUDA_STATUS(cudaMemcpy(rawPtr(), src, length * sizeof(T), cudaMemcpyHostToDevice));
}
void copyToHost(void *dst, NbElts_t length) override {
void copyToHost(void *dst, NbElts_t length) const override {
CHECK_CUDA_STATUS(cudaMemcpy(dst, rawPtr(), length * sizeof(T), cudaMemcpyDeviceToHost));
}
......@@ -137,8 +137,9 @@ class TensorImpl_cuda : public TensorImpl, public TensorImpl_cuda_ {
return mData;
};
void *hostPtr() override {
return nullptr;
const void *rawPtr() const override {
AIDGE_ASSERT(mData != nullptr, "accessing uninitialized const rawPtr");
return mData;
};
void* getRaw(std::size_t idx) {
......
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