]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/commitdiff
Merge pull request #1236 from mlapin/legacy_nvcc_support
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Fri, 16 Jan 2015 05:04:43 +0000 (21:04 -0800)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Fri, 16 Jan 2015 05:04:43 +0000 (21:04 -0800)
Drop OpenCV includes from NVCC code for legacy reasons.

1  2 
Makefile
include/caffe/data_transformer.hpp

diff --cc Makefile
index 2d82e058085b8d2526cf196326a98e6451b012e4,dcd7b2457b79b2a7f8edcf76a10dc5e3de1701b1..d47df30c7c866e8ccccb5d4c8d1d6945124cb872
+++ b/Makefile
@@@ -234,15 -242,14 +234,14 @@@ endi
  # libstdc++ instead of libc++ for CUDA compatibility on 10.9
  ifeq ($(OSX), 1)
        CXX := /usr/bin/clang++
 +      CXXFLAGS += -stdlib=libstdc++
 +      LINKFLAGS += -stdlib=libstdc++
        # clang throws this warning for cuda headers
        WARNINGS += -Wno-unneeded-internal-declaration
 -      ifneq ($(findstring 10.9, $(shell sw_vers -productVersion)),)
 -              CXXFLAGS += -stdlib=libstdc++
 -              LINKFLAGS += -stdlib=libstdc++
 -      endif
 +      # gtest needs to use its own tuple to not conflict with clang
 +      CXXFLAGS += -DGTEST_USE_OWN_TR1_TUPLE=1
        # boost::thread is called boost_thread-mt to mark multithreading on OS X
        LIBRARIES += boost_thread-mt
-       NVCCFLAGS += -DOSX
  endif
  
  # Custom compiler
index 84ebba281255e4567b87e67a30d51733d78c5b7e,70e74368ca7223c11ccbf56713a75dcbb4638b62..0cfb5dcc7a319e667ed4ccd05f59145bb012885d
@@@ -62,11 -58,9 +58,9 @@@ class DataTransformer 
     *    cv::Mat containing the data to be transformed.
     * @param transformed_blob
     *    This is destination blob. It can be part of top blob's data if
 -   *    set_cpu_data() is used See image_data_layer.cpp for an example.
 +   *    set_cpu_data() is used. See image_data_layer.cpp for an example.
     */
- #ifndef OSX
    void Transform(const cv::Mat& cv_img, Blob<Dtype>* transformed_blob);
- #endif
  
    /**
     * @brief Applies the same transformation defined in the data layer's