Lunchbox  1.8.0
decompressor.h
1 
2 /* Copyright (c) 2013, Stefan.Eilemann@epfl.ch
3  *
4  * This file is part of Lunchbox <https://github.com/Eyescale/Lunchbox>
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef LUNCHBOX_DECOMPRESSOR_H
21 #define LUNCHBOX_DECOMPRESSOR_H
22 
23 #include <lunchbox/api.h>
24 #include <lunchbox/types.h>
25 #include <lunchbox/thread.h> // thread-safety macros
26 
27 namespace lunchbox
28 {
29 namespace detail { class Decompressor; }
30 
32 class Decompressor : public NonCopyable
33 {
34 public:
36  LUNCHBOX_API Decompressor();
37 
45  LUNCHBOX_API Decompressor( PluginRegistry& from, const uint32_t name );
46 
48  LUNCHBOX_API virtual ~Decompressor();
49 
51  LUNCHBOX_API bool isGood() const;
52 
57  LUNCHBOX_API bool uses( const uint32_t name ) const;
58 
60  LUNCHBOX_API const EqCompressorInfo& getInfo() const;
61 
70  LUNCHBOX_API bool setup( PluginRegistry& from, const uint32_t name );
71 
73  LUNCHBOX_API void clear();
74 
86  LUNCHBOX_API void decompress( const void* const* in,
87  const uint64_t* const inSizes,
88  const unsigned numInputs, void* const out,
89  uint64_t outDim[2] );
102  LUNCHBOX_API void decompress( const void* const* in,
103  const uint64_t* const inSizes,
104  const unsigned numInputs, void* const out,
105  uint64_t pvpOut[4], const uint64_t flags );
106 
107 private:
108  detail::Decompressor* const impl_;
109  LB_TS_VAR( _thread );
110 };
111 }
112 #endif // LUNCHBOX_DECOMPRESSOR_H