OS/X build fixes
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
CXX := g++
|
CXX := g++
|
||||||
CC := gcc
|
CC := gcc
|
||||||
ARCHFLAGS := -arch i386 -arch x86_64
|
ARCHFLAGS :=
|
||||||
OPTFLAGS := -DNDEBUG -ffast-math -mfpmath=sse -msse -msse2 -O3 -ftree-vectorize
|
OPTFLAGS := -DNDEBUG -ffast-math -mfpmath=sse -msse -msse2 -O3 -ftree-vectorize
|
||||||
|
|
||||||
CXXFLAGS := $(ARCHFLAGS) $(OPTFLAGS) -I/usr/local/include -DUSE_PTHREADS -DHAVE_VDSP -DUSE_SPEEX -DNO_THREAD_CHECKS -DNO_TIMING -Irubberband -I. -Isrc
|
CXXFLAGS := $(ARCHFLAGS) $(OPTFLAGS) -I/usr/local/include -DUSE_PTHREADS -DMALLOC_IS_ALIGNED -DHAVE_VDSP -DUSE_SPEEX -DNO_THREAD_CHECKS -DNO_TIMING -Irubberband -I. -Isrc
|
||||||
|
|
||||||
LIBRARY_LIBS := -framework Accelerate
|
LIBRARY_LIBS := -framework Accelerate
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ T *allocate(size_t count)
|
|||||||
#ifdef __MSVC__
|
#ifdef __MSVC__
|
||||||
ptr = _aligned_malloc(count * sizeof(T), alignment);
|
ptr = _aligned_malloc(count * sizeof(T), alignment);
|
||||||
#else /* !__MSVC__ */
|
#else /* !__MSVC__ */
|
||||||
|
#ifndef MALLOC_IS_ALIGNED
|
||||||
#warning "No aligned malloc available or defined"
|
#warning "No aligned malloc available or defined"
|
||||||
|
#endif
|
||||||
// Note that malloc always aligns to 16 byte boundaries on OS/X
|
// Note that malloc always aligns to 16 byte boundaries on OS/X
|
||||||
ptr = malloc(count * sizeof(T));
|
ptr = malloc(count * sizeof(T));
|
||||||
#endif /* !__MSVC__ */
|
#endif /* !__MSVC__ */
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ inline void v_abs(float *const R__ dst,
|
|||||||
const int count)
|
const int count)
|
||||||
{
|
{
|
||||||
float tmp[count];
|
float tmp[count];
|
||||||
vvfabf(tmp, dst, &count);
|
vvfabsf(tmp, dst, &count);
|
||||||
v_copy(dst, tmp, count);
|
v_copy(dst, tmp, count);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user