Skip to content

Commit

Permalink
remove residual pthread references, but restore in build for gtest
Browse files Browse the repository at this point in the history
gtest depends on pthread in Ubuntu 14.04
  • Loading branch information
shelhamer committed Aug 31, 2014
1 parent 45a80fa commit 4dcb96e
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ ifneq ($(CPU_ONLY), 1)
LIBRARY_DIRS += $(CUDA_LIB_DIR)
LIBRARIES := cudart cublas curand
endif
LIBRARIES += \
LIBRARIES += pthread \
glog gflags protobuf leveldb snappy \
lmdb \
boost_system \
Expand Down Expand Up @@ -277,7 +277,7 @@ LIBRARY_DIRS += $(BLAS_LIB)

# Complete build flags.
COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -fPIC $(COMMON_FLAGS) $(WARNINGS)
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
NVCCFLAGS := -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
# mex may invoke an older gcc that is too liberal with -Wuninitalized
MATLAB_CXXFLAGS := $(CXXFLAGS) -Wno-uninitialized
Expand Down
1 change: 0 additions & 1 deletion include/caffe/loss_layers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "boost/scoped_ptr.hpp"
#include "hdf5.h"
#include "leveldb/db.h"
#include "pthread.h"

#include "caffe/blob.hpp"
#include "caffe/common.hpp"
Expand Down
1 change: 0 additions & 1 deletion include/caffe/neuron_layers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "boost/scoped_ptr.hpp"
#include "hdf5.h"
#include "pthread.h"

#include "caffe/blob.hpp"
#include "caffe/common.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/caffe/layers/data_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace caffe {

// This function is used to create a pthread that prefetches the data.
// This function is used to create a thread that prefetches the data.
template <typename Dtype>
void DataLayer<Dtype>::InternalThreadEntry() {
Datum datum;
Expand Down
1 change: 0 additions & 1 deletion src/caffe/layers/data_layer.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <vector>

#include "leveldb/db.h"
#include "pthread.h"
#include "stdint.h"

#include "caffe/layer.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/caffe/layers/image_data_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace caffe {

// This function is used to create a pthread that prefetches the data.
// This function is used to create a thread that prefetches the data.
template <typename Dtype>
void ImageDataLayer<Dtype>::InternalThreadEntry() {
Datum datum;
Expand Down
3 changes: 0 additions & 3 deletions src/caffe/layers/window_data_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//
// Based on data_layer.cpp by Yangqing Jia.

#include <stdint.h>

#include <algorithm>
Expand Down
4 changes: 0 additions & 4 deletions src/caffe/layers/window_data_layer.cu
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Based on data_layer.cpp by Yangqing Jia.

#include <pthread.h>
#include <stdint.h>

#include <string>
Expand Down

0 comments on commit 4dcb96e

Please sign in to comment.