Skip to content

Commit

Permalink
fixes for mac compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jcanny committed Apr 26, 2015
1 parent a4cd6a5 commit 4806e09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jni/src/BIDMach_CPUMACH.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ JNIEXPORT jdouble JNICALL Java_edu_berkeley_bid_CPUMACH_word2vecEvalPos
cv = cv / (1.0f + cv);
}

dv += log(max((double)cv, 1.0e-40));
dv += log(fmax((double)cv, 1.0e-40));
}
}
}
Expand Down Expand Up @@ -346,7 +346,7 @@ JNIEXPORT jdouble JNICALL Java_edu_berkeley_bid_CPUMACH_word2vecEvalNeg
cv = exp(cv);
cv = cv / (1.0f + cv);
}
dv += log(max(1.0 - (double)cv, 1.0e-40));
dv += log(fmax(1.0 - (double)cv, 1.0e-40));
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions jni/src/configure
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if [ "$OS" = "apple" ] ; then
JAVA_HOME=`/usr/libexec/java_home`
fi
CUDA_HOME="/usr/local/cuda"
CC="gcc"
CC="icc"
GCC="g++"
NVCC="nvcc"
NVCCFLAGS="-c -ccbin=clang -use_fast_math -I$BIDMACH_ROOT/jni/include \
Expand All @@ -72,9 +72,9 @@ if [ "$OS" = "apple" ] ; then
OBJ="o"
OUTFLG="-o "
CPPFLAGS="-fPIC -c -O2 -g -DNDEBUG -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin -I$BIDMACH_ROOT/jni/include -I$CUDA_HOME/include"
CFLAGS="-fPIC -c -O2 -g -DNDEBUG -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin -I$MKL_ROOT/include -I$MKL_ROOT/include/${ARCHD}${SUBDIR}"
CFLAGS="-openmp -fPIC -c -O2 -g -DNDEBUG -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin -I$MKL_ROOT/include -I$MKL_ROOT/include/${ARCHD}${SUBDIR}"
LB="ar rc"
LD="g++ -shared"
LD="icc -dynamiclib"
GLD="nvcc -shared -Xlinker -rpath -Xlinker ${CUDA_HOME}/lib -lstdc++"
LDFLAGS="$LDFLAGS"
LIBPREPEND="lib"
Expand Down

0 comments on commit 4806e09

Please sign in to comment.