Skip to content

Commit

Permalink
fix cnpy
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanxw committed Dec 25, 2018
1 parent 664048c commit 066af39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/DataConsolidator.cpp
@@ -1,6 +1,7 @@
#pragma GCC diagnostic ignored "-Wint-in-bool-context"
#include "DataConsolidator.h"

#include <cmath> // std::isfinite
#include <string>
#include <vector>

Expand Down Expand Up @@ -336,7 +337,8 @@ bool DataConsolidator::isEqual(Matrix& a, Matrix& b) {
const int nc = a.cols;
for (int i = 0; i < nr; ++i) {
for (int j = 0; j < nc; ++j) {
if (finite(a(i, j)) && finite(b(i, j)) && a(i, j) != b(i, j))
if (std::isfinite(a(i, j)) && std::isfinite(b(i, j)) &&
a(i, j) != b(i, j))
return false;
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/DataConsolidator.h
@@ -1,8 +1,6 @@
#ifndef _DATACONSOLIDATOR_H_
#define _DATACONSOLIDATOR_H_

#include <cmath> // std::isfinite

#include "base/KinshipHolder.h"
#include "base/Logger.h"
#include "base/MathMatrix.h"
Expand Down
3 changes: 2 additions & 1 deletion third/Makefile.win
Expand Up @@ -72,9 +72,10 @@ zstd: zstd-1.3.1.tar.gz
ln -s -f zstd-1.3.1 zstd
(cd zstd; make)

cnpy: cnpy.zip
cnpy: cnpy.zip zlib
unzip -o $< ## -o: overwrite existing file
ln -s -f cnpy-master cnpy
sed -i 's:<zlib.h>: "../zlib":' cnpy/cnpy.h
(cd cnpy; $(CXX) -std=c++11 -c cnpy.cpp; $(AR) rcs libcnpy.a cnpy.o)

######################################################################
Expand Down

0 comments on commit 066af39

Please sign in to comment.