Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patches #15

Open
hadim opened this issue Aug 28, 2020 · 1 comment
Open

Patches #15

hadim opened this issue Aug 28, 2020 · 1 comment

Comments

@hadim
Copy link

hadim commented Aug 28, 2020

Here are two patches I used to be able to create a conda package for tmap using a modern compiler C++11.

diff --git a/tmap/tmap/analyse.cc b/tmap/tmap/analyse.cc
index b282b74..1d6e686 100644
--- a/tmap/tmap/analyse.cc
+++ b/tmap/tmap/analyse.cc
@@ -30,7 +30,7 @@ namespace {
 
     std::vector<float> diff(weights.size());
     std::transform(weights.begin(), weights.end(), diff.begin(),
-                  std::bind2nd(std::minus<float>(), mean));
+                  std::bind(std::minus<float>(), std::placeholders::_1, mean));
     float sq_sum = std::inner_product(diff.begin(), diff.end(), diff.begin(), 0.0);
     float stdev = std::sqrt(sq_sum / weights.size());
 
@@ -64,7 +64,7 @@ namespace {
 
       std::vector<float> diff(weights.size());
       std::transform(weights.begin(), weights.end(), diff.begin(),
-                    std::bind2nd(std::minus<float>(), mean));
+                    std::bind(std::minus<float>(), std::placeholders::_1, mean));
       float sq_sum = std::inner_product(diff.begin(), diff.end(), diff.begin(), 0.0);
       float stdev = std::sqrt(sq_sum / weights.size());
diff --git a/tmap/setup.py b/tmap/setup.py
index 28c0d06..4d7e240 100644
--- a/tmap/setup.py
+++ b/tmap/setup.py
@@ -54,8 +54,6 @@ class CMakeBuild(build_ext):
             cmake_args += [
                 "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir)
             ]
-            if sys.maxsize > 2 ** 32:
-                cmake_args += ["-A", "x64"]
             build_args += ["--", "/m"]
         elif platform.system() == 'Darwin':
             cmake_args += ['-DOpenMP_C_FLAG=-fopenmp']
@hadim
Copy link
Author

hadim commented Aug 28, 2020

ping @daenuprobst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant