Commit 3a91295e authored by Joachim's avatar Joachim
Browse files

Merge branch 'master' of https://github.com/davisking/dlib

parents 22164e5d 75f66582
...@@ -18,8 +18,9 @@ ...@@ -18,8 +18,9 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <memory>
#include "../matrix.h" #include "../matrix.h"
#include "../smart_pointers.h"
#include "optimization_bobyqa_abstract.h" #include "optimization_bobyqa_abstract.h"
#include "optimization.h" #include "optimization.h"
...@@ -59,7 +60,7 @@ namespace dlib ...@@ -59,7 +60,7 @@ namespace dlib
{ {
const unsigned long n = x.size(); const unsigned long n = x.size();
const unsigned long w_size = (npt+5)*(npt+n)+3*n*(n+5)/2; const unsigned long w_size = (npt+5)*(npt+n)+3*n*(n+5)/2;
scoped_ptr<doublereal[]> w(new doublereal[w_size]); std::unique_ptr<doublereal[]> w(new doublereal[w_size]);
// make these temporary matrices becuse U might be some // make these temporary matrices becuse U might be some
// kind of matrix_exp that doesn't support taking the address // kind of matrix_exp that doesn't support taking the address
......
...@@ -151,6 +151,7 @@ ...@@ -151,6 +151,7 @@
#include <deque> #include <deque>
#include <complex> #include <complex>
#include <map> #include <map>
#include <memory>
#include <set> #include <set>
#include <limits> #include <limits>
#include "uintn.h" #include "uintn.h"
...@@ -160,7 +161,6 @@ ...@@ -160,7 +161,6 @@
#include "unicode.h" #include "unicode.h"
#include "byte_orderer.h" #include "byte_orderer.h"
#include "float_details.h" #include "float_details.h"
#include "smart_pointers/shared_ptr.h"
namespace dlib namespace dlib
{ {
...@@ -1490,7 +1490,7 @@ namespace dlib ...@@ -1490,7 +1490,7 @@ namespace dlib
} }
private: private:
shared_ptr<std::ofstream> fout; std::shared_ptr<std::ofstream> fout;
}; };
class proxy_deserialize class proxy_deserialize
...@@ -1513,7 +1513,7 @@ namespace dlib ...@@ -1513,7 +1513,7 @@ namespace dlib
} }
private: private:
shared_ptr<std::ifstream> fin; std::shared_ptr<std::ifstream> fin;
}; };
inline proxy_serialize serialize(const std::string& filename) inline proxy_serialize serialize(const std::string& filename)
......
...@@ -5,13 +5,14 @@ ...@@ -5,13 +5,14 @@
#include "server_kernel_abstract.h" #include "server_kernel_abstract.h"
#include <memory>
#include <string>
#include "../threads.h" #include "../threads.h"
#include "../sockets.h" #include "../sockets.h"
#include <string>
#include "../algs.h" #include "../algs.h"
#include "../set.h" #include "../set.h"
#include "../logger.h" #include "../logger.h"
#include "../smart_pointers.h"
namespace dlib namespace dlib
...@@ -209,8 +210,8 @@ namespace dlib ...@@ -209,8 +210,8 @@ namespace dlib
int max_connections; int max_connections;
mutex max_connections_mutex; mutex max_connections_mutex;
signaler thread_count_zero; signaler thread_count_zero;
scoped_ptr<thread_function> async_start_thread; std::unique_ptr<thread_function> async_start_thread;
scoped_ptr<listener> sock; std::unique_ptr<listener> sock;
unsigned long graceful_close_timeout; unsigned long graceful_close_timeout;
......
This diff is collapsed.
This diff is collapsed.
...@@ -66,7 +66,11 @@ ...@@ -66,7 +66,11 @@
#define DLIB_HAVE_POWER_VEC #define DLIB_HAVE_POWER_VEC
#endif #endif
#endif #endif
#ifdef __ARM_NEON
#ifndef DLIB_HAVE_NEON
#define DLIB_HAVE_NEON
#endif
#endif
#endif #endif
#endif #endif
...@@ -97,7 +101,9 @@ ...@@ -97,7 +101,9 @@
#include <immintrin.h> // AVX #include <immintrin.h> // AVX
// #include <avx2intrin.h> // #include <avx2intrin.h>
#endif #endif
#ifdef DLIB_HAVE_NEON
#include <arm_neon.h> // ARM NEON
#endif
#endif // DLIB_SIMd_CHECK_Hh_ #endif // DLIB_SIMd_CHECK_Hh_
......
...@@ -3,9 +3,21 @@ ...@@ -3,9 +3,21 @@
#ifndef DLIB_SMART_POINTERs_H_ #ifndef DLIB_SMART_POINTERs_H_
#define DLIB_SMART_POINTERs_H_ #define DLIB_SMART_POINTERs_H_
#include "smart_pointers/scoped_ptr.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.
#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"
#endif
#include <memory>
#include "smart_pointers/shared_ptr.h" #include "smart_pointers/shared_ptr.h"
#include "smart_pointers/weak_ptr.h" #include "smart_pointers/weak_ptr.h"
#include "smart_pointers/scoped_ptr.h"
#endif // DLIB_SMART_POINTERs_H_ #endif // DLIB_SMART_POINTERs_H_
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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