Skip to content
Snippets Groups Projects
Commit 151f782c authored by Thibault Allenet's avatar Thibault Allenet
Browse files

Add an offset argument in the tensor copy CPP implementation

parent 0687f9bc
No related branches found
No related tags found
2 merge requests!50version 0.2.0,!2Scheduler ConnectInput and tensor filling with offset tests
Pipeline #30955 failed
......@@ -37,9 +37,9 @@ class TensorImpl_cpu : public TensorImpl {
std::size_t scalarSize() const override { return sizeof(T); }
void copy(const void *src, NbElts_t length) override {
void copy(const void *src, NbElts_t length, std::size_t offset = 0) override {
std::copy(static_cast<const T *>(src), static_cast<const T *>(src) + length,
static_cast<T *>(rawPtr()));
static_cast<T *>(rawPtr())+offset);
}
void *rawPtr() override {
......
......@@ -57,3 +57,4 @@ TEST_CASE("Tensor creation") {
}
}
}
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