Commit 9ba7889f authored by Davis King's avatar Davis King

merged

parents a94aa00e c3fa856c
......@@ -126,6 +126,9 @@ else()
endif()
message(STATUS "USING BOOST_LIBS: ${Boost_LIBRARIES}")
if (WIN32)
message(STATUS "USING PYTHON_LIBS: ${PYTHON_LIBRARIES}")
endif()
if (CMAKE_COMPILER_IS_GNUCXX)
# Just setting CMAKE_POSITION_INDEPENDENT_CODE should be enough to set
......@@ -150,6 +153,7 @@ macro(add_python_module module_name module_sources )
TARGET_LINK_LIBRARIES(${module_name}_ ${Boost_LIBRARIES} dlib::dlib)
if(WIN32 AND NOT CYGWIN)
TARGET_LINK_LIBRARIES(${module_name}_ ${PYTHON_LIBRARIES})
SET_TARGET_PROPERTIES( ${module_name}_
PROPERTIES
PREFIX ""
......
......@@ -168,7 +168,7 @@ namespace dlib
const matrix_exp<EXP>& item
)
{
DLIB_CASSERT(idx < num_samples());
DLIB_CASSERT(idx < (unsigned long)num_samples());
DLIB_CASSERT(item.size() == nr()*nc()*k());
static_assert((is_same_type<float, typename EXP::type>::value == true),
"To assign a matrix to a tensor the matrix must contain float values");
......
......@@ -18,7 +18,7 @@ void validate_numpy_array_type (
)
{
using namespace boost::python;
const char ch = extract<char>(obj.attr("dtype").attr("char"));
const char ch = boost::python::extract<char>(obj.attr("dtype").attr("char"));
if (dlib::is_same_type<T,double>::value && ch != 'd')
throw dlib::error("Expected numpy.ndarray of float64");
......
......@@ -45,10 +45,10 @@ struct serialize_pickle : boost::python::pickle_suite
// UTF-8 encodings. So instead we access the python C interface directly and use
// bytes objects. However, we keep the deserialization code that worked with str
// for backwards compatibility with previously pickled files.
if (extract<str>(state[0]).check())
if (boost::python::extract<str>(state[0]).check())
{
str data = extract<str>(state[0]);
std::string temp(extract<const char*>(data), len(data));
str data = boost::python::extract<str>(state[0]);
std::string temp(boost::python::extract<const char*>(data), len(data));
std::istringstream sin(temp);
deserialize(item, sin);
}
......
......@@ -44,7 +44,7 @@ namespace dlib
inline simd4i low() const { return _mm256_castsi256_si128(x); }
inline simd4i high() const { return _mm256_extractf128_si256(x,1); }
inline unsigned int size() const { return 4; }
inline unsigned int size() const { return 8; }
inline int32 operator[](unsigned int idx) const
{
int32 temp[8];
......
......@@ -3,14 +3,12 @@
#ifndef DLIB_SMART_POINTERs_H_
#define DLIB_SMART_POINTERs_H_
// This is legacy smart pointer code that will likely to stop working under default
// compiler flags when C++17 becomes the default standard in the compilers.
// Please consider migrating your code to contemporary smart pointers from C++
// standard library. The warning below will help to detect if the deprecated code
// was included from library's clients.
// This is legacy smart pointer code that will likely stop working under default compiler
// flags when C++17 becomes the default standard in compilers. Please consider migrating
// your code to new smart pointers from C++ standard library.
#if (defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 8) || (__GNUC__ > 4))) || \
(defined(__clang__) && ((__clang_major__ >= 3 && __clang_minor__ >= 4)))
#pragma GCC warning "smart_pointers.h is included which will fail to compile under C++17"
#pragma GCC warning "smart_pointers.h is included. This code will fail to compile under C++17"
#endif
#include <memory>
......
......@@ -6,7 +6,7 @@ rem the pings are to wait between builds so visual studio doesn't get in a funk.
echo testing python >> test_log.txt
rm -rf build_python
rmdir /S /Q build_python
mkdir build_python
cd build_python
cmake -G "Visual Studio 14 2015 Win64" ../../../tools/python -DPYTHON3=ON
......@@ -17,7 +17,7 @@ cd ..
echo testing vc2015 >> test_log.txt
rm -rf build_vc2015_64
rmdir /S /Q build_vc2015_64
mkdir build_vc2015_64
cd build_vc2015_64
cmake -G "Visual Studio 14 2015 Win64" ..
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment