Skip to content

Commit

Permalink
remove boost dependecies
Browse files Browse the repository at this point in the history
  • Loading branch information
sh1r0 committed Jun 12, 2015
1 parent 6604a37 commit c021b34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
9 changes: 0 additions & 9 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ def build_protobuf(ndk_build):
os.chdir(p_dir)


def build_boost(ndk_path):
if not os.path.isdir('Boost-for-Android/build'):
p_dir = os.getcwdu()
os.chdir('Boost-for-Android')
call(['./build-android.sh', ndk_path, '--boost=1.55.0', '--with-libraries=date_time,math,random,thread,system'])
os.chdir(p_dir)


def build_caffe(ndk_build, project_lib=None):
p_dir = os.getcwdu()
os.chdir('caffe-mobile')
Expand Down Expand Up @@ -112,7 +104,6 @@ def main(argv):
ndk_build_ = setup_ndk_build(jobs=args.jobs)

build_protobuf(ndk_build_)
build_boost(args.ndk_path)
build_caffe(ndk_build_, project_lib=args.project_lib)


Expand Down
13 changes: 2 additions & 11 deletions caffe-mobile/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,12 @@ LOCAL_SRC_FILES := $(PRORO_CC) \
$(foreach caffe_cxx_src,$(CAFFE_CXX_SRCS),caffe/$(caffe_cxx_src))
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../eigen3 \
$(LOCAL_PATH)/caffe/include $(LOCAL_PATH)/caffe/include/caffe/proto \
$(LOCAL_PATH)/../../Boost-for-Android/build/include/boost-1_55 \
$(LOCAL_PATH)/../../opencv/jni/include

LOCAL_STATIC_LIBRARIES += protobuf
LOCAL_CPPFLAGS += -pthread -fPIC -fexceptions -frtti -std=c++11 -DUSE_EIGEN -DCPU_ONLY

# boost
LOCAL_LDLIBS += -lm -llog -L$(LOCAL_PATH)/../../Boost-for-Android/build/lib/
LOCAL_LDLIBS += -lboost_random-gcc-mt-1_55 \
-lboost_math_tr1-gcc-mt-1_55 \
-lboost_system-gcc-mt-1_55 \
-lboost_thread-gcc-mt-1_55 \
-lboost_date_time-gcc-mt-1_55 \
-lboost_atomic-gcc-mt-1_55
LOCAL_LDLIBS += -lm -llog

LOCAL_ARM_MODE := arm
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
Expand All @@ -110,8 +102,7 @@ LOCAL_MODULE := caffe_jni

LOCAL_SRC_FILES := caffe_jni.cpp caffe_mobile.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../eigen3 $(LOCAL_PATH)/caffe/include \
$(LOCAL_PATH)/../../Boost-for-Android/build/include/boost-1_55 \
$(LOCAL_PATH)/../../opencv/jni/include
$(LOCAL_PATH)/../../opencv/jni/include

# LOCAL_STATIC_LIBRARIES += caffe
LOCAL_SHARED_LIBRARIES := caffe
Expand Down
2 changes: 1 addition & 1 deletion caffe-mobile/jni/caffe
Submodule caffe updated 50 files
+9 −6 Makefile
+3 −2 Makefile.mobile
+1 −1 docs/development.md
+13 −8 docs/install_apt.md
+2 −2 docs/install_osx.md
+27 −16 docs/model_zoo.md
+2 −1 examples/hdf5_classification.ipynb
+1 −1 examples/web_demo/app.py
+5 −4 include/caffe/common.hpp
+2 −2 include/caffe/common_layers.hpp
+2 −0 include/caffe/data_layers.hpp
+4 −8 include/caffe/internal_thread.hpp
+90 −6 include/caffe/neuron_layers.hpp
+267 −26 include/caffe/proto/caffe.pb.h
+1 −1 include/caffe/syncedmem.hpp
+6 −3 include/caffe/util/benchmark.hpp
+19 −15 include/caffe/util/cudnn.hpp
+3 −5 include/caffe/util/rng.hpp
+6 −3 include/caffe/vision_layers.hpp
+1 −1 python/classify.py
+1 −2 python/requirements.txt
+0 −1 scripts/travis/travis_install.sh
+2 −2 src/caffe/internal_thread.cpp
+7 −5 src/caffe/layers/cudnn_conv_layer.cpp
+72 −22 src/caffe/layers/cudnn_conv_layer.cu
+4 −6 src/caffe/layers/cudnn_pooling_layer.cpp
+9 −3 src/caffe/layers/cudnn_pooling_layer.cu
+2 −2 src/caffe/layers/cudnn_relu_layer.cpp
+11 −5 src/caffe/layers/cudnn_relu_layer.cu
+2 −2 src/caffe/layers/cudnn_sigmoid_layer.cpp
+11 −5 src/caffe/layers/cudnn_sigmoid_layer.cu
+2 −2 src/caffe/layers/cudnn_softmax_layer.cpp
+11 −4 src/caffe/layers/cudnn_softmax_layer.cu
+2 −2 src/caffe/layers/cudnn_tanh_layer.cpp
+12 −5 src/caffe/layers/cudnn_tanh_layer.cu
+43 −10 src/caffe/layers/hdf5_data_layer.cpp
+13 −6 src/caffe/layers/hdf5_data_layer.cu
+16 −23 src/caffe/layers/lrn_layer.cu
+140 −0 src/caffe/layers/prelu_layer.cpp
+130 −0 src/caffe/layers/prelu_layer.cu
+578 −213 src/caffe/proto/caffe.pb.cc
+20 −1 src/caffe/proto/caffe.proto
+1 −1 src/caffe/solver.cpp
+38 −0 src/caffe/test/test_lrn_layer.cpp
+196 −0 src/caffe/test/test_neuron_layer.cpp
+0 −8 src/caffe/test/test_pooling_layer.cpp
+12 −12 src/caffe/util/benchmark.cpp
+23 −0 src/caffe/util/cudnn.cpp
+19 −17 src/caffe/util/math_functions.cpp
+19 −17 src/caffe/util/math_functions_eigen.cpp

0 comments on commit c021b34

Please sign in to comment.