aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-08 15:20:21 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-01-08 15:20:21 +0000
commit1d52bd4cad64d8d8662f40c11210b705351b43ab (patch)
treec8fe83368e8e13ba7e8ec0c4ef078f5293cfea4d /bench
parente2d2a7d2226b85569a9360b9738c15498fb454ac (diff)
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
Diffstat (limited to 'bench')
-rw-r--r--bench/benchVecAdd.cpp6
-rwxr-xr-xbench/btl/libs/hand_vec/hand_vec_interface.hh8
2 files changed, 7 insertions, 7 deletions
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<Scalar>(size2);
- Scalar* b = ei_aligned_malloc<Scalar>(size2+4)+1;
- Scalar* c = ei_aligned_malloc<Scalar>(size2);
+ Scalar* a = ei_aligned_new<Scalar>(size2);
+ Scalar* b = ei_aligned_new<Scalar>(size2+4)+1;
+ Scalar* c = ei_aligned_new<Scalar>(size2);
for (int i=0; i<size; ++i)
{
diff --git a/bench/btl/libs/hand_vec/hand_vec_interface.hh b/bench/btl/libs/hand_vec/hand_vec_interface.hh
index 592be82d5..4e7d549ce 100755
--- a/bench/btl/libs/hand_vec/hand_vec_interface.hh
+++ b/bench/btl/libs/hand_vec/hand_vec_interface.hh
@@ -38,16 +38,16 @@ public :
typedef typename f77_interface_base<real>::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<real>(N*N);
+ A = ei_aligned_new<real>(N*N);
for (int j=0;j<N;j++)
for (int i=0;i<N;i++)
A[i+N*j] = A_stl[j][i];
@@ -55,7 +55,7 @@ public :
static inline void vector_from_stl(gene_vector & B, stl_vector & B_stl){
int N = B_stl.size();
- B = ei_aligned_malloc<real>(N);
+ B = ei_aligned_new<real>(N);
for (int i=0;i<N;i++)
B[i] = B_stl[i];
}