Equalizer
1.4.1
|
00001 00002 /* Copyright (c) 2010, Cedric Stalder <cedric.stalder@gmail.com> 00003 * 2011-2012, Stefan Eilemann <eile@eyescale.ch> 00004 * 00005 * This library is free software; you can redistribute it and/or modify it under 00006 * the terms of the GNU Lesser General Public License version 2.1 as published 00007 * by the Free Software Foundation. 00008 * 00009 * This library is distributed in the hope that it will be useful, but WITHOUT 00010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00012 * details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this library; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00017 */ 00018 00019 #ifndef CO_CPUCOMPRESSOR_H 00020 #define CO_CPUCOMPRESSOR_H 00021 00022 #include "co/compressor.h" 00023 #include <co/plugins/compressor.h> 00024 00025 namespace co 00026 { 00028 class CPUCompressor : public Compressor 00029 { 00030 public: 00032 CPUCompressor() {} 00033 virtual ~CPUCompressor() {} 00034 00041 CO_API void compress( void* const in, const uint64_t inDims[2] ); 00042 00050 CO_API void compress( void* const in, const uint64_t pvp[4], 00051 const eq_uint64_t flags ); 00052 00054 CO_API unsigned getNumResults() const; 00055 00063 CO_API void getResult( const unsigned i, void** const out, 00064 uint64_t* const outSize ) const; 00065 00076 CO_API void decompress( const void* const* in, 00077 const uint64_t* const inSizes, 00078 const unsigned numInputs, void* const out, 00079 uint64_t outDim[2] ); 00080 00092 CO_API void decompress( const void* const* in, 00093 const uint64_t* const inSizes, 00094 const unsigned numInputs, void* const out, 00095 uint64_t pvpOut[4], const uint64_t flags ); 00096 00109 static CO_API uint32_t chooseCompressor( const uint32_t tokenType, 00110 const float minQuality = 1.0f, 00111 const bool ignoreMSE = false ); 00112 00124 CO_API bool initCompressor( const uint32_t dataType, 00125 const float quality, 00126 const bool ignoreMSE = false ); 00127 }; 00128 } 00129 #endif // CO_CPUCOMPRESSOR_H