Mercurial > hg > silvet
changeset 356:7dcff010d9cd
Some tidying, switch to libc++
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 14:45:19 +0100 |
parents | 50fde8eecba5 |
children | 0af00da90a40 |
files | .hgsubstate Makefile.osx src/Silvet.cpp |
diffstat | 3 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Mon Sep 07 12:01:19 2015 +0100 +++ b/.hgsubstate Mon Sep 07 14:45:19 2015 +0100 @@ -1,3 +1,3 @@ 7a48704e9a0fac1486240f9f7b7e31436a588064 bqvec -b4018913cd9b9ec5833c6003b5c0642f0353eb2f constant-q-cpp +b8d8f2325662aa3eeb898407aecd52c61e04f7d2 constant-q-cpp d25a2e91e9d84aaff25e5d746398232d182d127d flattendynamics
--- a/Makefile.osx Mon Sep 07 12:01:19 2015 +0100 +++ b/Makefile.osx Mon Sep 07 14:45:19 2015 +0100 @@ -1,7 +1,7 @@ -ARCHFLAGS ?= -mmacosx-version-min=10.6 -arch x86_64 -arch i386 +ARCHFLAGS ?= -mmacosx-version-min=10.7 -arch x86_64 -arch i386 -CXXFLAGS += $(ARCHFLAGS) -DMALLOC_IS_ALIGNED -O3 -ftree-vectorize -I../vamp-plugin-sdk +CXXFLAGS += $(ARCHFLAGS) -DMALLOC_IS_ALIGNED -O3 -ftree-vectorize -I../vamp-plugin-sdk -std=c++11 -stdlib=libc++ LDFLAGS += $(ARCHFLAGS) -dynamiclib ../vamp-plugin-sdk/libvamp-sdk.a -exported_symbols_list vamp-plugin.list -install_name silvet.dylib
--- a/src/Silvet.cpp Mon Sep 07 12:01:19 2015 +0100 +++ b/src/Silvet.cpp Mon Sep 07 14:45:19 2015 +0100 @@ -24,17 +24,21 @@ #include "LiveInstruments.h" #include <vector> -#include <future> #include <cstdio> +#if (defined(MAX_EM_THREADS) && (MAX_EM_THREADS > 1)) +#include <future> +using std::future; +using std::async; +#endif + using std::vector; using std::cout; using std::cerr; using std::endl; using std::pair; -using std::future; -using std::async; + using Vamp::RealTime; static int processingSampleRate = 44100; @@ -727,7 +731,11 @@ localBestShifts = vector<vector<int> >(width); } - int emThreadCount = MAX_EM_THREADS; + int emThreadCount = 1; + +#if (defined(MAX_EM_THREADS) && (MAX_EM_THREADS > 1)) + emThreadCount = MAX_EM_THREADS; + if (emThreadCount > int(std::thread::hardware_concurrency())) { emThreadCount = std::thread::hardware_concurrency(); } @@ -736,7 +744,6 @@ emThreadCount = 1; } -#if (defined(MAX_EM_THREADS) && (MAX_EM_THREADS > 1)) if (emThreadCount > 1) { for (int i = 0; i < width; ) { typedef future<pair<vector<double>, vector<int>>> EMFuture;