Commit 549aac5e authored by Lucas Serrano's avatar Lucas Serrano
Browse files

Fix: Store not storing data correctly

parent 63359d80
......@@ -327,13 +327,13 @@ class BaseMatrix {
return returned_array;
}
void store(T* addr) {
void store(T addr[]) {
if (NCols == VecSize) { // In this case there is no padding, we can copy directly the array
std::memcpy(addr, this->array, sizeof(T)*NRows*VecSize);
}
else {
for (int i=0; i<NRows; i++) {
std::memcpy(addr, &this->array[i*VecSize], sizeof(T)*NCols);
std::memcpy(&addr[i*NCols], &this->array[i*VecSize], sizeof(T)*NCols);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment