SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
TileManager.h
Go to the documentation of this file.
1
17/*
18 * TileManager.h
19 *
20 * Created on: Feb 23, 2018
21 * Author: mschefer
22 */
23
24#ifndef _SEFRAMEWORK_IMAGE_TILEMANAGER_H_
25#define _SEFRAMEWORK_IMAGE_TILEMANAGER_H_
26
27#include <iostream>
28#include <thread>
29#include <list>
30#include <unordered_map>
31
32#include <boost/thread/shared_mutex.hpp>
33
34#include <ElementsKernel/Logging.h>
35
38
39namespace SourceXtractor {
40
41
50
52 out << tk.getRepr();
53 return out;
54}
55
56}
57
58namespace std {
59
60template<>
61struct hash<SourceXtractor::TileKey> {
64 boost::hash_combine(local_hash, key.m_source);
65 boost::hash_combine(local_hash, key.m_tile_x);
66 boost::hash_combine(local_hash, key.m_tile_y);
67 return local_hash;
68 }
69};
70
71}
72
73namespace SourceXtractor {
74
120
121}
122
123
124#endif /* _SEFRAMEWORK_IMAGE_TILEMANAGER_H_ */
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > x
std::shared_ptr< DependentParameter< std::shared_ptr< EngineParameter > > > y
std::unordered_map< const ImageSource *, std::shared_ptr< boost::mutex > > m_mutex_map
std::shared_ptr< ImageTile > getTileForPixel(int x, int y, std::shared_ptr< const ImageSource > source)
boost::shared_mutex m_mutex
std::list< TileKey > m_tile_list
std::shared_ptr< ImageTile > tryTileFromCache(const TileKey &key)
void removeTile(TileKey tile_key)
void addTile(TileKey key, std::shared_ptr< ImageTile > tile)
void setOptions(int tile_width, int tile_height, int max_memory)
static std::shared_ptr< TileManager > getInstance()
std::unordered_map< TileKey, std::shared_ptr< ImageTile > > m_tile_map
std::shared_ptr< boost::mutex > & getMutexForImageSource(const ImageSource *)
std::ostream & operator<<(std::ostream &s, const cell_stream_adaptor &cell)
STL namespace.
bool operator==(const TileKey &other) const
std::shared_ptr< const ImageSource > m_source
Definition TileManager.h:43
std::string getRepr() const
std::size_t operator()(const SourceXtractor::TileKey &key) const
Definition TileManager.h:62