[ismrmrd] 80/281: Removed std::valarray assignments. They seem to be causing problems for GCC/G++ VERSION < 4.6
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:00:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag ismrmrd0.5
in repository ismrmrd.
commit 5d4f4825aac7076a9c2442a320761b1500c3ce76
Author: Michael S. Hansen <michael.hansen at nih.gov>
Date: Mon Jan 21 14:40:58 2013 -0500
Removed std::valarray assignments. They seem to be causing problems for GCC/G++ VERSION < 4.6
---
ismrmrd.h | 3 ++-
ismrmrd_hdf5.cpp | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ismrmrd.h b/ismrmrd.h
index d2561d7..081d443 100644
--- a/ismrmrd.h
+++ b/ismrmrd.h
@@ -419,7 +419,8 @@ public:
NDArrayContainer(const std::vector<unsigned int>& dimensions, T* d) {
dimensions_ = dimensions;
- data_ = std::valarray<T>(d, elements());
+ data_.resize(elements());
+ memcpy(&data_[0],d,sizeof(T)*elements());
}
virtual ~NDArrayContainer() {}
diff --git a/ismrmrd_hdf5.cpp b/ismrmrd_hdf5.cpp
index 86c2571..145d40a 100644
--- a/ismrmrd_hdf5.cpp
+++ b/ismrmrd_hdf5.cpp
@@ -255,7 +255,7 @@ template <typename T> boost::shared_ptr< NDArrayContainer<T> > IsmrmrdDataset::r
DataSpace memspace(rank,&slice_dims[0]);
- ret->data_ = std::valarray<T>(ret->elements());
+ ret->data_.resize(ret->elements());
//OK finally ready, now read the data.
d.read(reinterpret_cast<void*>(&(ret->data_[0])), *datatype, memspace, dataspace, H5P_DEFAULT);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git
More information about the debian-science-commits
mailing list