view release on metacpan or search on metacpan
src/Source/LibWebP/src/utils/thread.h view on Meta::CPAN
#include "../webp/types.h"
#ifdef __cplusplus
extern "C" {
#endif
// State of the worker thread object
typedef enum {
NOT_OK = 0, // object is unusable
OK, // ready to work
WORK // busy finishing the current task
} WebPWorkerStatus;
// Function to be called by the worker thread. Takes two opaque pointers as
// arguments (data1 and data2), and should return false in case of error.
typedef int (*WebPWorkerHook)(void*, void*);
// Platform-dependent implementation details for the worker.
typedef struct WebPWorkerImpl WebPWorkerImpl;
// Synchronization object used to launch job in the worker thread
src/Source/OpenEXR/Iex/IexErrnoExc.h view on Meta::CPAN
DEFINE_EXC (EnxioExc, ErrnoExc)
DEFINE_EXC (E2bigExc, ErrnoExc)
DEFINE_EXC (EnoexecExc, ErrnoExc)
DEFINE_EXC (EbadfExc, ErrnoExc)
DEFINE_EXC (EchildExc, ErrnoExc)
DEFINE_EXC (EagainExc, ErrnoExc)
DEFINE_EXC (EnomemExc, ErrnoExc)
DEFINE_EXC (EaccesExc, ErrnoExc)
DEFINE_EXC (EfaultExc, ErrnoExc)
DEFINE_EXC (EnotblkExc, ErrnoExc)
DEFINE_EXC (EbusyExc, ErrnoExc)
DEFINE_EXC (EexistExc, ErrnoExc)
DEFINE_EXC (ExdevExc, ErrnoExc)
DEFINE_EXC (EnodevExc, ErrnoExc)
DEFINE_EXC (EnotdirExc, ErrnoExc)
DEFINE_EXC (EisdirExc, ErrnoExc)
DEFINE_EXC (EinvalExc, ErrnoExc)
DEFINE_EXC (EnfileExc, ErrnoExc)
DEFINE_EXC (EmfileExc, ErrnoExc)
DEFINE_EXC (EnottyExc, ErrnoExc)
DEFINE_EXC (EtxtbsyExc, ErrnoExc)
src/Source/OpenEXR/Iex/IexForward.h view on Meta::CPAN
class EnxioExc;
class E2bigExc;
class EnoexecExc;
class EbadfExc;
class EchildExc;
class EagainExc;
class EnomemExc;
class EaccesExc;
class EfaultExc;
class EnotblkExc;
class EbusyExc;
class EexistExc;
class ExdevExc;
class EnodevExc;
class EnotdirExc;
class EisdirExc;
class EinvalExc;
class EnfileExc;
class EmfileExc;
class EnottyExc;
class EtxtbsyExc;
src/Source/OpenEXR/Iex/IexThrowErrnoExc.cpp view on Meta::CPAN
throw EfaultExc (tmp);
#endif
#if defined (ENOTBLK)
case ENOTBLK:
throw EnotblkExc (tmp);
#endif
#if defined (EBUSY)
case EBUSY:
throw EbusyExc (tmp);
#endif
#if defined (EEXIST)
case EEXIST:
throw EexistExc (tmp);
#endif
#if defined (EXDEV)
case EXDEV:
throw ExdevExc (tmp);
src/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp view on Meta::CPAN
numThreads(numThreads),
multiPartBackwardSupport(false),
multiPartFile(NULL),
memoryMapped(false),
frameBufferValid(false),
_streamData(NULL),
_deleteStream(false)
{
//
// We need at least one lineBuffer, but if threading is used,
// to keep n threads busy we need 2*n lineBuffers
//
lineBuffers.resize (max (1, 2 * numThreads));
for (size_t i = 0; i < lineBuffers.size(); i++)
lineBuffers[i] = 0;
sampleCountTableComp = 0;
}
src/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.cpp view on Meta::CPAN
complete = true;
for (unsigned int i = 0; i < lineOffsets.size(); i++)
{
if (lineOffsets[i] <= 0)
{
//
// Invalid data in the line offset table mean that
// the file is probably incomplete (the table is
// the last thing written to the file). Either
// some process is still busy writing the file,
// or writing the file was aborted.
//
// We should still be able to read the existing
// parts of the file. In order to do this, we
// have to make a sequential scan over the scan
// line data to reconstruct the line offset table.
//
complete = false;
reconstructLineOffsets (is, lineOrder, lineOffsets);
src/Source/OpenEXR/IlmImf/ImfDeepScanLineInputFile.h view on Meta::CPAN
//-----------------------------------
const DeepFrameBuffer & frameBuffer () const;
//---------------------------------------------------------------
// Check if the file is complete:
//
// isComplete() returns true if all pixels in the data window are
// present in the input file, or false if any pixels are missing.
// (Another program may still be busy writing the file, or file
// writing may have been aborted prematurely.)
//---------------------------------------------------------------
bool isComplete () const;
//---------------------------------------------------------------
// Read pixel data:
//
// readPixels(s1,s2) reads all scan lines with y coordinates
src/Source/OpenEXR/IlmImf/ImfDeepScanLineInputPart.h view on Meta::CPAN
//-----------------------------------
const DeepFrameBuffer & frameBuffer () const;
//---------------------------------------------------------------
// Check if the file is complete:
//
// isComplete() returns true if all pixels in the data window are
// present in the input file, or false if any pixels are missing.
// (Another program may still be busy writing the file, or file
// writing may have been aborted prematurely.)
//---------------------------------------------------------------
bool isComplete () const;
//---------------------------------------------------------------
// Read pixel data:
//
// readPixels(s1,s2) reads all scan lines with y coordinates
src/Source/OpenEXR/IlmImf/ImfDeepScanLineOutputFile.cpp view on Meta::CPAN
DeepScanLineOutputFile::Data::Data (int numThreads):
lineOffsetsPosition (0),
partNumber (-1) ,
_streamData(NULL),
_deleteStream(false)
{
//
// We need at least one lineBuffer, but if threading is used,
// to keep n threads busy we need 2*n lineBuffers.
//
lineBuffers.resize (max (1, 2 * numThreads));
for (size_t i = 0; i < lineBuffers.size(); i++)
lineBuffers[i] = 0;
}
DeepScanLineOutputFile::Data::~Data ()
{
src/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp view on Meta::CPAN
numYTiles (0),
partNumber (-1),
multiPartBackwardSupport(false),
numThreads(numThreads),
memoryMapped(false),
_streamData(NULL),
_deleteStream(false)
{
//
// We need at least one tileBuffer, but if threading is used,
// to keep n threads busy we need 2*n tileBuffers
//
tileBuffers.resize (max (1, 2 * numThreads));
}
DeepTiledInputFile::Data::~Data ()
{
delete [] numXTiles;
delete [] numYTiles;
src/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h view on Meta::CPAN
class IMF_EXPORT DeepTiledInputFile : public GenericInputFile
{
public:
//--------------------------------------------------------------------
// A constructor that opens the file with the specified name, and
// reads the file header. The constructor throws an IEX_NAMESPACE::ArgExc
// exception if the file is not tiled.
// The numThreads parameter specifies how many worker threads this
// file will try to keep busy when decompressing individual tiles.
// Destroying TiledInputFile objects constructed with this constructor
// automatically closes the corresponding files.
//--------------------------------------------------------------------
DeepTiledInputFile (const char fileName[],
int numThreads = globalThreadCount ());
// ----------------------------------------------------------
// A constructor that attaches the new TiledInputFile object
src/Source/OpenEXR/IlmImf/ImfDeepTiledInputFile.h view on Meta::CPAN
//-----------------------------------
const DeepFrameBuffer & frameBuffer () const;
//------------------------------------------------------------
// Check if the file is complete:
//
// isComplete() returns true if all pixels in the data window
// (in all levels) are present in the input file, or false if
// any pixels are missing. (Another program may still be busy
// writing the file, or file writing may have been aborted
// prematurely.)
//------------------------------------------------------------
bool isComplete () const;
//--------------------------------------------------
// Utility functions:
//--------------------------------------------------
src/Source/OpenEXR/IlmImf/ImfDeepTiledInputPart.h view on Meta::CPAN
//-----------------------------------
const DeepFrameBuffer & frameBuffer () const;
//------------------------------------------------------------
// Check if the file is complete:
//
// isComplete() returns true if all pixels in the data window
// (in all levels) are present in the input file, or false if
// any pixels are missing. (Another program may still be busy
// writing the file, or file writing may have been aborted
// prematurely.)
//------------------------------------------------------------
bool isComplete () const;
//--------------------------------------------------
// Utility functions:
//--------------------------------------------------
src/Source/OpenEXR/IlmImf/ImfDeepTiledOutputFile.cpp view on Meta::CPAN
DeepTiledOutputFile::Data::Data (int numThreads):
numXTiles(0),
numYTiles(0),
tileOffsetsPosition (0),
partNumber(-1),
_streamData(NULL),
_deleteStream(true)
{
//
// We need at least one tileBuffer, but if threading is used,
// to keep n threads busy we need 2*n tileBuffers
//
tileBuffers.resize (max (1, 2 * numThreads));
for (size_t i = 0; i < tileBuffers.size(); i++)
tileBuffers[i] = 0;
}
DeepTiledOutputFile::Data::~Data ()
{
src/Source/OpenEXR/IlmImf/ImfInputFile.h view on Meta::CPAN
//-----------------------------------
const FrameBuffer & frameBuffer () const;
//---------------------------------------------------------------
// Check if the file is complete:
//
// isComplete() returns true if all pixels in the data window are
// present in the input file, or false if any pixels are missing.
// (Another program may still be busy writing the file, or file
// writing may have been aborted prematurely.)
//---------------------------------------------------------------
bool isComplete () const;
//---------------------------------------------------------------
// Check if SSE optimization is enabled
//
// Call after setFrameBuffer() to query whether optimized file decoding
src/Source/OpenEXR/IlmImf/ImfOutputFile.cpp view on Meta::CPAN
OutputFile::Data::Data (int numThreads):
lineOffsetsPosition (0),
partNumber (-1),
_streamData(0),
_deleteStream(false)
{
//
// We need at least one lineBuffer, but if threading is used,
// to keep n threads busy we need 2*n lineBuffers.
//
lineBuffers.resize (max (1, 2 * numThreads));
}
OutputFile::Data::~Data ()
{
for (size_t i = 0; i < lineBuffers.size(); i++)
delete lineBuffers[i];
src/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp view on Meta::CPAN
};
ScanLineInputFile::Data::Data (int numThreads):
partNumber(-1),
memoryMapped(false)
{
//
// We need at least one lineBuffer, but if threading is used,
// to keep n threads busy we need 2*n lineBuffers
//
lineBuffers.resize (max (1, 2 * numThreads));
}
ScanLineInputFile::Data::~Data ()
{
for (size_t i = 0; i < lineBuffers.size(); i++)
delete lineBuffers[i];
src/Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp view on Meta::CPAN
complete = true;
for (unsigned int i = 0; i < lineOffsets.size(); i++)
{
if (lineOffsets[i] <= 0)
{
//
// Invalid data in the line offset table mean that
// the file is probably incomplete (the table is
// the last thing written to the file). Either
// some process is still busy writing the file,
// or writing the file was aborted.
//
// We should still be able to read the existing
// parts of the file. In order to do this, we
// have to make a sequential scan over the scan
// line data to reconstruct the line offset table.
//
complete = false;
reconstructLineOffsets (is, lineOrder, lineOffsets);
src/Source/OpenEXR/IlmImf/ImfScanLineInputFile.h view on Meta::CPAN
//-----------------------------------
const FrameBuffer & frameBuffer () const;
//---------------------------------------------------------------
// Check if the file is complete:
//
// isComplete() returns true if all pixels in the data window are
// present in the input file, or false if any pixels are missing.
// (Another program may still be busy writing the file, or file
// writing may have been aborted prematurely.)
//---------------------------------------------------------------
bool isComplete () const;
//---------------------------------------------------------------
// Check if SSE optimisation is enabled
//
src/Source/OpenEXR/IlmImf/ImfThreading.h view on Meta::CPAN
//
// * The functions in this file query and control the total number
// of worker threads, which will be created globally for the whole
// library. Regardless of how many input or output files are
// opened simultaneously, the library will use at most this number
// of worker threads to perform all work. The default number of
// global worker threads is zero (i.e. single-threaded operation;
// everything happens in the thread that calls the library).
//
// * Furthermore, it is possible to set the number of threads that
// each input or output file should keep busy. This number can
// be explicitly set for each file. The default behavior is for
// each file to try to occupy all worker threads in the library's
// thread pool.
//
//-----------------------------------------------------------------------------
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
//-----------------------------------------------------------------------------
src/Source/OpenEXR/IlmImf/ImfTileOffsets.cpp view on Meta::CPAN
for (unsigned int l = 0; l < _offsets.size(); ++l)
for (unsigned int dy = 0; dy < _offsets[l].size(); ++dy)
for (unsigned int dx = 0; dx < _offsets[l][dy].size(); ++dx)
OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read <OPENEXR_IMF_INTERNAL_NAMESPACE::StreamIO> (is, _offsets[l][dy][dx]);
//
// Check if any tile offsets are invalid.
//
// Invalid offsets mean that the file is probably incomplete
// (the offset table is the last thing written to the file).
// Either some process is still busy writing the file, or
// writing the file was aborted.
//
// We should still be able to read the existing parts of the
// file. In order to do this, we have to make a sequential
// scan over the scan tile to reconstruct the tile offset
// table.
//
if (anyOffsetsAreInvalid())
{
src/Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp view on Meta::CPAN
numYTiles (0),
partNumber (-1),
multiPartBackwardSupport(false),
numThreads(numThreads),
memoryMapped(false),
_streamData(NULL),
_deleteStream(false)
{
//
// We need at least one tileBuffer, but if threading is used,
// to keep n threads busy we need 2*n tileBuffers
//
tileBuffers.resize (max (1, 2 * numThreads));
}
TiledInputFile::Data::~Data ()
{
delete [] numXTiles;
delete [] numYTiles;
src/Source/OpenEXR/IlmImf/ImfTiledInputFile.h view on Meta::CPAN
class IMF_EXPORT TiledInputFile : public GenericInputFile
{
public:
//--------------------------------------------------------------------
// A constructor that opens the file with the specified name, and
// reads the file header. The constructor throws an IEX_NAMESPACE::ArgExc
// exception if the file is not tiled.
// The numThreads parameter specifies how many worker threads this
// file will try to keep busy when decompressing individual tiles.
// Destroying TiledInputFile objects constructed with this constructor
// automatically closes the corresponding files.
//--------------------------------------------------------------------
TiledInputFile (const char fileName[],
int numThreads = globalThreadCount ());
// ----------------------------------------------------------
// A constructor that attaches the new TiledInputFile object
src/Source/OpenEXR/IlmImf/ImfTiledInputFile.h view on Meta::CPAN
//-----------------------------------
const FrameBuffer & frameBuffer () const;
//------------------------------------------------------------
// Check if the file is complete:
//
// isComplete() returns true if all pixels in the data window
// (in all levels) are present in the input file, or false if
// any pixels are missing. (Another program may still be busy
// writing the file, or file writing may have been aborted
// prematurely.)
//------------------------------------------------------------
bool isComplete () const;
//--------------------------------------------------
// Utility functions:
//--------------------------------------------------
src/Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp view on Meta::CPAN
TiledOutputFile::Data::Data (int numThreads):
multipart(false),
numXTiles(0),
numYTiles(0),
tileOffsetsPosition (0),
partNumber(-1)
{
//
// We need at least one tileBuffer, but if threading is used,
// to keep n threads busy we need 2*n tileBuffers
//
tileBuffers.resize (max (1, 2 * numThreads));
}
TiledOutputFile::Data::~Data ()
{
delete [] numXTiles;
delete [] numYTiles;