From 1d52bd4cad64d8d8662f40c11210b705351b43ab Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 8 Jan 2009 15:20:21 +0000 Subject: the big memory changes. the most important changes are: ei_aligned_malloc now really behaves like a malloc (untyped, doesn't call ctor) ei_aligned_new is the typed variant calling ctor EIGEN_MAKE_ALIGNED_OPERATOR_NEW now takes the class name as parameter --- bench/benchVecAdd.cpp | 6 +++--- bench/btl/libs/hand_vec/hand_vec_interface.hh | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'bench') diff --git a/bench/benchVecAdd.cpp b/bench/benchVecAdd.cpp index ef85b3ced..396ab6a63 100644 --- a/bench/benchVecAdd.cpp +++ b/bench/benchVecAdd.cpp @@ -21,9 +21,9 @@ int main(int argc, char* argv[]) { int size = SIZE * 8; int size2 = size * size; - Scalar* a = ei_aligned_malloc(size2); - Scalar* b = ei_aligned_malloc(size2+4)+1; - Scalar* c = ei_aligned_malloc(size2); + Scalar* a = ei_aligned_new(size2); + Scalar* b = ei_aligned_new(size2+4)+1; + Scalar* c = ei_aligned_new(size2); for (int i=0; i::gene_vector gene_vector; static void free_matrix(gene_matrix & A, int N){ - ei_aligned_free(A, 0); + ei_aligned_delete(A); } static void free_vector(gene_vector & B){ - ei_aligned_free(B, 0); + ei_aligned_delete(B); } static inline void matrix_from_stl(gene_matrix & A, stl_matrix & A_stl){ int N = A_stl.size(); - A = ei_aligned_malloc(N*N); + A = ei_aligned_new(N*N); for (int j=0;j(N); + B = ei_aligned_new(N); for (int i=0;i