oops, got confused by the preprocessor directives around

posix_memalign...
This commit is contained in:
Gael Guennebaud 2009-02-21 16:35:57 +00:00
parent 7c4f9ecf0c
commit 3d86dcf473

View File

@ -75,9 +75,6 @@ inline void* ei_aligned_malloc(size_t size)
void *result; void *result;
#if EIGEN_HAS_POSIX_MEMALIGN && EIGEN_ARCH_WANTS_ALIGNMENT && !EIGEN_MALLOC_ALREADY_ALIGNED #if EIGEN_HAS_POSIX_MEMALIGN && EIGEN_ARCH_WANTS_ALIGNMENT && !EIGEN_MALLOC_ALREADY_ALIGNED
#ifdef EIGEN_EXCEPTIONS
const int failed =
#endif
if(posix_memalign(&result, 16, size)) if(posix_memalign(&result, 16, size))
result = 0; result = 0;
#else #else
@ -92,12 +89,9 @@ inline void* ei_aligned_malloc(size_t size)
#else #else
result = ei_handmade_aligned_malloc(size); result = ei_handmade_aligned_malloc(size);
#endif #endif
#ifdef EIGEN_EXCEPTIONS
const int failed = (result == 0);
#endif
#endif #endif
#ifdef EIGEN_EXCEPTIONS #ifdef EIGEN_EXCEPTIONS
if(failed) if(result == 0)
throw std::bad_alloc(); throw std::bad_alloc();
#endif #endif
return result; return result;