commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 02/07: cmake: runtime: On Darwin, malloc is


From: git
Subject: [Commit-gnuradio] [gnuradio] 02/07: cmake: runtime: On Darwin, malloc is always aligned to a 16 byte boundary, to work with Altivec and SSE (etc) SIMD; so, set ALIGNED_MALLOC to 16 for those Darwin systems that do not have posix_memalign.
Date: Thu, 26 Jun 2014 19:54:37 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch maint
in repository gnuradio.

commit 093314f01ffee01ca970df01e5ae48d173c08e47
Author: Michael Dickens <address@hidden>
Date:   Tue Jun 17 14:23:38 2014 -0400

    cmake: runtime: On Darwin, malloc is always aligned to a 16 byte boundary, 
to work with Altivec and SSE (etc) SIMD; so, set ALIGNED_MALLOC to 16 for those 
Darwin systems that do not have posix_memalign.
---
 gnuradio-runtime/ConfigChecks.cmake | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnuradio-runtime/ConfigChecks.cmake 
b/gnuradio-runtime/ConfigChecks.cmake
index 46e15b5..9487d6a 100644
--- a/gnuradio-runtime/ConfigChecks.cmake
+++ b/gnuradio-runtime/ConfigChecks.cmake
@@ -122,7 +122,12 @@ CHECK_CXX_SOURCE_COMPILES("
 )
 GR_ADD_COND_DEF(HAVE_VALLOC)
 
-ADD_DEFINITIONS(-DALIGNED_MALLOC=0)
+if(APPLE)
+    # Apple's malloc has been 16 byte aligned since at least 10.4
+    ADD_DEFINITIONS(-DALIGNED_MALLOC=16)
+else()
+    ADD_DEFINITIONS(-DALIGNED_MALLOC=0)
+endif()
 
 ########################################################################
 SET(CMAKE_REQUIRED_LIBRARIES -lpthread)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]