Commit 33cf4ebc authored by Davis King's avatar Davis King

All I did in this change was rename memory_manager<char>::kernel_1a to default_memory_manager.

default_memory_manager is way more readable and clear.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404080
parent bfbb580b
......@@ -5,7 +5,6 @@
#include "any.h"
#include "../smart_pointers.h"
#include "../memory_manager.h"
#include "any_decision_function_abstract.h"
......@@ -25,7 +24,7 @@ namespace dlib
typedef sample_type_ sample_type;
typedef scalar_type_ scalar_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
any_decision_function()
{
......
......@@ -4,7 +4,7 @@
#ifdef DLIB_AnY_DECISION_FUNCTION_ABSTRACT_H_
#include "any_abstract.h"
#include "../memory_manager.h"
#include "../algs.h"
namespace dlib
{
......@@ -38,7 +38,7 @@ namespace dlib
typedef sample_type_ sample_type;
typedef scalar_type_ scalar_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
any_decision_function(
);
......
......@@ -7,7 +7,6 @@
#include "../smart_pointers.h"
#include "any_decision_function.h"
#include "../memory_manager.h"
#include "any_trainer_abstract.h"
#include <vector>
......@@ -26,7 +25,7 @@ namespace dlib
public:
typedef sample_type_ sample_type;
typedef scalar_type_ scalar_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef any_decision_function<sample_type, scalar_type> trained_function_type;
......
......@@ -4,7 +4,7 @@
#ifdef DLIB_AnY_TRAINER_ABSTRACT_H_
#include "any_abstract.h"
#include "../memory_manager.h"
#include "../algs.h"
#include "any_decision_function_abstract.h"
#include <vector>
......@@ -47,7 +47,7 @@ namespace dlib
typedef sample_type_ sample_type;
typedef scalar_type_ scalar_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef any_decision_function<sample_type, scalar_type> trained_function_type;
any_trainer(
......
......@@ -12,15 +12,14 @@
#include "array/array_expand_1.h"
#include "array/array_expand_c.h"
#include "memory_manager.h"
#include "algs.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class array
{
......
......@@ -7,7 +7,6 @@
#include "../interfaces/enumerable.h"
#include "../algs.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
......@@ -15,7 +14,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class array_kernel_1 : public enumerable<T>
{
......
......@@ -13,7 +13,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class array_kernel_2 : public enumerable<T>
{
......
......@@ -5,14 +5,14 @@
#include "../interfaces/enumerable.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class array : public enumerable<T>
{
......
......@@ -6,7 +6,7 @@
#include "array2d/array2d_kernel_1.h"
#include "array2d/array2d_kernel_c.h"
#include "memory_manager.h"
#include "algs.h"
......@@ -16,7 +16,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class array2d
{
......
......@@ -7,14 +7,13 @@
#include "../algs.h"
#include "../interfaces/enumerable.h"
#include "../serialize.h"
#include "../memory_manager.h"
#include "../geometry/rectangle.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class array2d_kernel_1 : public enumerable<T>
{
......
......@@ -5,7 +5,7 @@
#include "../interfaces/enumerable.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include "../geometry/rectangle_abstract.h"
namespace dlib
......@@ -13,7 +13,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class array2d : public enumerable<T>
{
......
......@@ -9,7 +9,7 @@
#include "binary_search_tree/binary_search_tree_kernel_c.h"
#include "memory_manager.h"
#include "algs.h"
#include <functional>
......@@ -19,7 +19,7 @@ namespace dlib
template <
typename domain,
typename range,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class binary_search_tree
......
......@@ -7,7 +7,7 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include <functional>
namespace dlib
......@@ -16,7 +16,7 @@ namespace dlib
template <
typename domain,
typename range,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class binary_search_tree : public enumerable<map_pair<domain,range> >,
......
......@@ -5,7 +5,7 @@
#include "directed_graph/directed_graph_kernel_1.h"
#include "memory_manager.h"
#include "algs.h"
namespace dlib
{
......@@ -13,7 +13,7 @@ namespace dlib
template <
typename T,
typename E = char,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class directed_graph
{
......
......@@ -9,7 +9,6 @@
#include "../smart_pointers.h"
#include "../algs.h"
#include <vector>
#include "../memory_manager.h"
#include "directed_graph_kernel_abstract.h"
#include "../is_kind.h"
......@@ -207,7 +206,7 @@ namespace dlib
template <
typename T,
typename E = char,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
bool is_checked = true
>
class directed_graph_kernel_1 : noncopyable
......
......@@ -4,7 +4,7 @@
#ifdef DLIB_DIRECTED_GRAPH_KERNEl_ABSTRACT_
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include "../noncopyable.h"
namespace dlib
......@@ -13,7 +13,7 @@ namespace dlib
template <
typename T,
typename E = char,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class directed_graph : noncopyable
{
......
......@@ -5,7 +5,7 @@
#include "graph/graph_kernel_1.h"
#include "memory_manager.h"
#include "algs.h"
namespace dlib
{
......@@ -13,7 +13,7 @@ namespace dlib
template <
typename T,
typename E = char,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class graph
{
......
......@@ -9,7 +9,6 @@
#include "../smart_pointers.h"
#include "../algs.h"
#include <vector>
#include "../memory_manager.h"
#include "graph_kernel_abstract.h"
#include "../is_kind.h"
......@@ -175,7 +174,7 @@ namespace dlib
template <
typename T,
typename E = char,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
bool is_checked = true
>
class graph_kernel_1 : noncopyable
......
......@@ -4,7 +4,7 @@
#ifdef DLIB_GRAPH_KERNEl_ABSTRACT_
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include "../noncopyable.h"
namespace dlib
......@@ -13,7 +13,7 @@ namespace dlib
template <
typename T,
typename E = char,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class graph : noncopyable
{
......
......@@ -9,7 +9,7 @@
#include "hash_table.h"
#include "algs.h"
#include "memory_manager.h"
#include "algs.h"
#include <functional>
namespace dlib
......@@ -19,7 +19,7 @@ namespace dlib
typename domain,
typename range,
unsigned long expnum,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class hash_map
......
......@@ -11,7 +11,6 @@
#include "../interfaces/remover.h"
#include "../assert.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
......@@ -21,7 +20,7 @@ namespace dlib
typename range,
unsigned long expnum,
typename hash_table,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class hash_map_kernel_1 : public enumerable<map_pair<domain,range> >,
public pair_remover<domain,range>
......
......@@ -8,7 +8,7 @@
#include "../interfaces/remover.h"
#include "../interfaces/map_pair.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include <functional>
namespace dlib
......@@ -18,7 +18,7 @@ namespace dlib
typename domain,
typename range,
unsigned long expnum,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<T>
>
class hash_map : public enumerable<map_pair<domain,range> >,
......
......@@ -10,7 +10,7 @@
#include "algs.h"
#include "memory_manager.h"
#include "algs.h"
#include <functional>
......@@ -20,7 +20,7 @@ namespace dlib
template <
typename T,
unsigned long expnum,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<T>
>
class hash_set
......
......@@ -10,7 +10,6 @@
#include "../interfaces/remover.h"
#include "../assert.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
......@@ -19,7 +18,7 @@ namespace dlib
typename T,
unsigned long expnum,
typename hash_table,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class hash_set_kernel_1 : public enumerable<const T>,
public remover<T>
......
......@@ -7,7 +7,7 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include <functional>
namespace dlib
......@@ -16,7 +16,7 @@ namespace dlib
template <
typename T,
unsigned long expnum,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<T>
>
class hash_set : public enumerable<const T>,
......
......@@ -7,7 +7,7 @@
#include "hash_table/hash_table_kernel_1.h"
#include "hash_table/hash_table_kernel_2.h"
#include "hash_table/hash_table_kernel_c.h"
#include "memory_manager.h"
#include "algs.h"
#include "binary_search_tree.h"
#include <functional>
......@@ -19,7 +19,7 @@ namespace dlib
template <
typename domain,
typename range,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class hash_table
......
......@@ -11,7 +11,6 @@
#include "../interfaces/remover.h"
#include "../assert.h"
#include "../serialize.h"
#include "../memory_manager.h"
#include <functional>
......@@ -21,7 +20,7 @@ namespace dlib
template <
typename domain,
typename range,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class hash_table_kernel_1 : public enumerable<map_pair<domain, range> >,
......
......@@ -11,7 +11,6 @@
#include "../interfaces/remover.h"
#include "../assert.h"
#include "../serialize.h"
#include "../memory_manager.h"
#include <functional>
namespace dlib
......@@ -21,7 +20,7 @@ namespace dlib
typename domain,
typename range,
typename bst_base,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class hash_table_kernel_2 : public enumerable<map_pair<domain,range> >,
......
......@@ -8,7 +8,7 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include <functional>
namespace dlib
......@@ -17,7 +17,7 @@ namespace dlib
template <
typename domain,
typename range,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class hash_table : public enumerable<map_pair<domain,range> >,
......
......@@ -9,7 +9,7 @@
#include "binary_search_tree.h"
#include "memory_manager.h"
#include "algs.h"
#include <functional>
......@@ -19,7 +19,7 @@ namespace dlib
template <
typename domain,
typename range,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class map
......
......@@ -9,7 +9,6 @@
#include "../interfaces/map_pair.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
......@@ -18,7 +17,7 @@ namespace dlib
typename domain,
typename range,
typename bst_base,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class map_kernel_1 : public enumerable<map_pair<domain,range> >,
public asc_pair_remover<domain,range,typename bst_base::compare_type>
......
......@@ -7,7 +7,7 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include <functional>
namespace dlib
......@@ -16,7 +16,7 @@ namespace dlib
template <
typename domain,
typename range,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<domain>
>
class map : public enumerable<map_pair<domain,range> >,
......
......@@ -5,7 +5,7 @@
#include "matrix_exp_abstract.h"
#include "../serialize.h"
#include "../memory_manager.h"
#include "../algs.h"
#include "matrix_data_layout_abstract.h"
namespace dlib
......@@ -183,7 +183,7 @@ namespace dlib
typename T,
long num_rows = 0,
long num_cols = 0,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename layout = row_major_layout
>
class matrix : public matrix_exp<matrix<T,num_rows,num_cols,mem_manager,layout> >
......
......@@ -33,7 +33,7 @@ namespace dlib
{
typedef T type;
typedef const T const_ret_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
const static long NR = 1;
const static long NC = 0;
......@@ -140,7 +140,7 @@ namespace dlib
{
typedef T type;
typedef const T const_ret_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
const static long NR = 1;
const static long NC = 0;
......@@ -220,7 +220,7 @@ namespace dlib
{
typedef long type;
typedef const long const_ret_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
const static long NR = 1;
const static long NC = tabs<(end - start)>::value/inc_ + 1;
const static long cost = 1;
......
......@@ -3,7 +3,7 @@
#ifndef DLIB_MATRIx_FWD
#define DLIB_MATRIx_FWD
#include "../memory_manager.h"
#include "../algs.h"
namespace dlib
{
......@@ -18,7 +18,7 @@ namespace dlib
typename T,
long num_rows = 0,
long num_cols = 0,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename layout = row_major_layout
>
class matrix;
......
......@@ -367,7 +367,7 @@ namespace dlib
const static long NC = 1;
typedef typename T::value_type type;
typedef const typename T::value_type& const_ret_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
const_ret_type apply (long r, long ) const { return vect[r]; }
......@@ -420,7 +420,7 @@ namespace dlib
const static long NC = 1;
typedef T type;
typedef const T& const_ret_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
const_ret_type apply (long r, long ) const { return ptr[r]; }
......@@ -466,7 +466,7 @@ namespace dlib
const static long NC = 0;
typedef T type;
typedef const T& const_ret_type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
const_ret_type apply (long r, long c) const { return ptr[r*cols + c]; }
......@@ -1811,7 +1811,7 @@ namespace dlib
const static long cost = 1;
const static long NR = 0;
const static long NC = 0;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
typedef T type;
typedef const T& const_ret_type;
......@@ -1895,7 +1895,7 @@ namespace dlib
const static long cost = 1;
const static long NR = NR_;
const static long NC = NC_;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
typedef T type;
typedef const T& const_ret_type;
......@@ -1934,7 +1934,7 @@ namespace dlib
const static long cost = 1;
const static long NR = NR_;
const static long NC = NC_;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
typedef T type;
typedef const T const_ret_type;
......@@ -2003,7 +2003,7 @@ namespace dlib
const static long cost = 1;
const static long NR = 0;
const static long NC = 0;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
typedef T type;
typedef const T const_ret_type;
......@@ -2109,7 +2109,7 @@ namespace dlib
const static long cost = 1;
const static long NR = N;
const static long NC = N;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
typedef T type;
typedef const T const_ret_type;
......@@ -2226,7 +2226,7 @@ namespace dlib
const static long cost = 1;
const static long NR = N;
const static long NC = N;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef row_major_layout layout_type;
typedef T type;
typedef const T const_ret_type;
......
......@@ -10,14 +10,14 @@
#include "queue/queue_sort_1.h"
#include "memory_manager.h"
#include "algs.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class queue
{
......
......@@ -8,14 +8,13 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class queue_kernel_1 : public enumerable<T>,
public remover<T>
......
......@@ -9,7 +9,6 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
......@@ -17,7 +16,7 @@ namespace dlib
template <
typename T,
unsigned long block_size,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class queue_kernel_2 : public enumerable<T>,
public remover<T>
......
......@@ -6,14 +6,14 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class queue : public enumerable<T>,
public remover<T>
......
......@@ -10,7 +10,7 @@
#include "sequence/sequence_compare_1.h"
#include "sequence/sequence_sort_1.h"
#include "sequence/sequence_sort_2.h"
#include "memory_manager.h"
#include "algs.h"
......@@ -20,7 +20,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class sequence
{
......
......@@ -8,14 +8,13 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class sequence_kernel_1 : public enumerable<T>,
public remover<T>
......
......@@ -8,7 +8,6 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
......@@ -16,7 +15,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class sequence_kernel_2 : public enumerable<T>,
public remover<T>
......
......@@ -6,13 +6,13 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class sequence : public enumerable<T>,
public remover<T>
......
......@@ -12,7 +12,7 @@
#include "set/set_compare_1.h"
#include "memory_manager.h"
#include "algs.h"
#include <functional>
namespace dlib
......@@ -20,7 +20,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<T>
>
class set
......
......@@ -8,7 +8,6 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
......@@ -16,7 +15,7 @@ namespace dlib
template <
typename T,
typename bst_base,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class set_kernel_1 : public enumerable<const T>,
public asc_remover<T,typename bst_base::compare_type>
......
......@@ -6,7 +6,7 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
#include <functional>
namespace dlib
......@@ -14,7 +14,7 @@ namespace dlib
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a,
typename mem_manager = default_memory_manager,
typename compare = std::less<T>
>
class set : public enumerable<const T>,
......
......@@ -5,14 +5,14 @@
#include "stack/stack_kernel_1.h"
#include "stack/stack_kernel_c.h"
#include "memory_manager.h"
#include "algs.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class stack
{
......
......@@ -8,14 +8,13 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class stack_kernel_1 : public enumerable<T>,
public remover<T>
......
......@@ -6,14 +6,14 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/remover.h"
#include "../serialize.h"
#include "../memory_manager/memory_manager_kernel_abstract.h"
#include "../algs.h"
namespace dlib
{
template <
typename T,
typename mem_manager = memory_manager<char>::kernel_1a
typename mem_manager = default_memory_manager
>
class stack : public enumerable<T>,
public remover<T>
......
......@@ -7,7 +7,6 @@
#include "../rand.h"
#include <vector>
#include "../algs.h"
#include "../memory_manager.h"
#include "../string.h"
#include "../serialize.h"
#include <iostream>
......@@ -36,7 +35,7 @@ namespace dlib
!*/
public:
typedef T type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef Rand_type rand_type;
typedef typename std::vector<T>::iterator iterator;
......
......@@ -5,7 +5,7 @@
#include <vector>
#include "../rand/rand_kernel_abstract.h"
#include "../memory_manager.h"
#include "../algs.h"
#include "../string.h"
namespace dlib
......@@ -71,7 +71,7 @@ namespace dlib
!*/
public:
typedef T type;
typedef memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
typedef Rand_type rand_type;
typedef typename std::vector<T>::iterator iterator;
......
......@@ -23,7 +23,7 @@ namespace dlib
{
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
sparse_radial_basis_kernel(const scalar_type g) : gamma(g) {}
sparse_radial_basis_kernel() : gamma(0.1) {}
......@@ -105,7 +105,7 @@ namespace dlib
{
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
sparse_polynomial_kernel(const scalar_type g, const scalar_type c, const scalar_type d) : gamma(g), coef(c), degree(d) {}
sparse_polynomial_kernel() : gamma(1), coef(0), degree(1) {}
......@@ -194,7 +194,7 @@ namespace dlib
{
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
sparse_sigmoid_kernel(const scalar_type g, const scalar_type c) : gamma(g), coef(c) {}
sparse_sigmoid_kernel() : gamma(0.1), coef(-1.0) {}
......@@ -277,7 +277,7 @@ namespace dlib
{
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
scalar_type operator() (
const sample_type& a,
......
......@@ -31,7 +31,7 @@ namespace dlib
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
const scalar_type gamma;
......@@ -132,7 +132,7 @@ namespace dlib
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
const scalar_type gamma;
const scalar_type coef;
......@@ -239,7 +239,7 @@ namespace dlib
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
const scalar_type gamma;
const scalar_type coef;
......@@ -351,7 +351,7 @@ namespace dlib
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
scalar_type operator() (
const sample_type& a,
......
......@@ -35,7 +35,7 @@ namespace
{
typedef typename T::value_type::second_type scalar_type;
typedef T sample_type;
typedef dlib::memory_manager<char>::kernel_1a mem_manager_type;
typedef default_memory_manager mem_manager_type;
scalar_type operator() (
const sample_type& a,
......
......@@ -642,7 +642,7 @@ namespace
typedef matrix<double,0,0> mat;
matrix<double,0,0,memory_manager<char>::kernel_1a, column_major_layout> a(M,N);
matrix<double,0,0,default_memory_manager, column_major_layout> a(M,N);
for (long r = 0; r < a.nr(); ++r)
{
for (long c = 0; c < a.nc(); ++c)
......@@ -651,9 +651,9 @@ namespace
}
}
matrix<double,M,M,memory_manager<char>::kernel_1a, column_major_layout> u, u2;
matrix<double,0,0,memory_manager<char>::kernel_1a, column_major_layout> q, q2;
matrix<double,N,N,memory_manager<char>::kernel_1a, column_major_layout> v, v2;
matrix<double,M,M,default_memory_manager, column_major_layout> u, u2;
matrix<double,0,0,default_memory_manager, column_major_layout> q, q2;
matrix<double,N,N,default_memory_manager, column_major_layout> v, v2;
matrix<double,M,N,MM, column_major_layout> a2;
a2 = tmp(a/2);
......@@ -875,7 +875,7 @@ namespace
const long M = 9;
const long N = 40;
typedef matrix<double,0,0,memory_manager<char>::kernel_1a, column_major_layout> mat;
typedef matrix<double,0,0,default_memory_manager, column_major_layout> mat;
mat a(M,N);
for (long r = 0; r < a.nr(); ++r)
{
......
......@@ -134,7 +134,7 @@ namespace
test_cholesky(uniform_matrix<double>(15,15,1) + 10*symm(randmat<double>(15,15)));
test_cholesky(uniform_matrix<double>(101,101,1) + 10*symm(randmat<double>(101,101)));
typedef matrix<double,0,0,memory_manager<char>::kernel_1a, column_major_layout> mat;
typedef matrix<double,0,0,default_memory_manager, column_major_layout> mat;
test_cholesky(mat(uniform_matrix<double>(101,101,1) + 10*symm(randmat<double>(101,101))));
}
......@@ -147,7 +147,7 @@ namespace
test_cholesky(uniform_matrix<float>(2,2,1) + 2*symm(randmat<float>(2,2)));
test_cholesky(uniform_matrix<float>(3,3,1) + 2*symm(randmat<float>(3,3)));
typedef matrix<float,0,0,memory_manager<char>::kernel_1a, column_major_layout> mat;
typedef matrix<float,0,0,default_memory_manager, column_major_layout> mat;
test_cholesky(mat(uniform_matrix<float>(3,3,1) + 2*symm(randmat<float>(3,3))));
}
......
......@@ -156,7 +156,7 @@ namespace
test_lu(10*randmat<double,137,200>());
test_lu(10*randmat<double,200,101>());
typedef matrix<double,0,0,memory_manager<char>::kernel_1a, column_major_layout> mat;
typedef matrix<double,0,0,default_memory_manager, column_major_layout> mat;
test_lu(mat(3*randmat<double>(4,4)));
test_lu(mat(3*randmat<double>(9,4)));
test_lu(mat(3*randmat<double>(3,8)));
......@@ -186,7 +186,7 @@ namespace
test_lu(3*randmat<float,137,200>());
test_lu(3*randmat<float,200,101>());
typedef matrix<float,0,0,memory_manager<char>::kernel_1a, column_major_layout> mat;
typedef matrix<float,0,0,default_memory_manager, column_major_layout> mat;
test_lu(mat(3*randmat<float>(4,4)));
test_lu(mat(3*randmat<float>(9,4)));
test_lu(mat(3*randmat<float>(3,8)));
......
......@@ -149,7 +149,7 @@ namespace
test_qr(10*randmat<double,15,15>());
test_qr(10*randmat<double,100,100>());
typedef matrix<double,0,0,memory_manager<char>::kernel_1a, column_major_layout> mat;
typedef matrix<double,0,0,default_memory_manager, column_major_layout> mat;
test_qr(mat(3*randmat<double>(9,4)));
test_qr(mat(3*randmat<double>(9,9)));
}
......@@ -172,7 +172,7 @@ namespace
test_qr(3*randmat<float,4,4>());
test_qr(3*randmat<float,9,4>());
typedef matrix<float,0,0,memory_manager<char>::kernel_1a, column_major_layout> mat;
typedef matrix<float,0,0,default_memory_manager, column_major_layout> mat;
test_qr(mat(3*randmat<float>(9,4)));
test_qr(mat(3*randmat<float>(9,9)));
}
......
......@@ -6,7 +6,6 @@
#include "timer/timer_kernel_1.h"
#include "timer/timer_kernel_2.h"
#include "uintn.h"
#include "memory_manager.h"
namespace dlib
{
......
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