You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
This commit is contained in:
-59
@@ -1,59 +0,0 @@
|
||||
//-*****************************************************************************
|
||||
//
|
||||
// Copyright (c) 2009-2011,
|
||||
// Sony Pictures Imageworks Inc. and
|
||||
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Sony Pictures Imageworks, nor
|
||||
// Industrial Light & Magic, nor the names of their contributors may be used
|
||||
// to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//-*****************************************************************************
|
||||
|
||||
#ifndef Alembic_AbcCoreHDF5_All_h
|
||||
#define Alembic_AbcCoreHDF5_All_h
|
||||
|
||||
#include <Alembic/Util/Export.h>
|
||||
#include <Alembic/AbcCoreHDF5/ReadWrite.h>
|
||||
|
||||
namespace Alembic {
|
||||
namespace AbcCoreHDF5 {
|
||||
namespace ALEMBIC_VERSION_NS {
|
||||
|
||||
//-*****************************************************************************
|
||||
// Forward declare this function, which can be used to create a cache.
|
||||
ALEMBIC_EXPORT ::Alembic::AbcCoreAbstract::ReadArraySampleCachePtr
|
||||
MakeCacheImplPtr();
|
||||
|
||||
} // End namespace ALEMBIC_VERSION_NS
|
||||
|
||||
using namespace ALEMBIC_VERSION_NS;
|
||||
|
||||
} // End namespace AbcCoreHDF5
|
||||
} // End namespace Alembic
|
||||
|
||||
#endif
|
||||
-102
@@ -1,102 +0,0 @@
|
||||
//-*****************************************************************************
|
||||
//
|
||||
// Copyright (c) 2009-2012,
|
||||
// Sony Pictures Imageworks Inc. and
|
||||
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Sony Pictures Imageworks, nor
|
||||
// Industrial Light & Magic, nor the names of their contributors may be used
|
||||
// to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//-*****************************************************************************
|
||||
|
||||
#ifndef Alembic_AbcCoreHDF5_ReadWrite_h
|
||||
#define Alembic_AbcCoreHDF5_ReadWrite_h
|
||||
|
||||
#include <Alembic/AbcCoreAbstract/All.h>
|
||||
#include <Alembic/Util/Export.h>
|
||||
|
||||
namespace Alembic {
|
||||
namespace AbcCoreHDF5 {
|
||||
namespace ALEMBIC_VERSION_NS {
|
||||
|
||||
//-*****************************************************************************
|
||||
//! Will return a shared pointer to the archive writer
|
||||
//! There is only one way to create an archive writer in AbcCoreHDF5.
|
||||
class ALEMBIC_EXPORT WriteArchive
|
||||
{
|
||||
public:
|
||||
WriteArchive();
|
||||
explicit WriteArchive( bool iCacheHierarchy );
|
||||
|
||||
::Alembic::AbcCoreAbstract::ArchiveWriterPtr
|
||||
operator()( const std::string &iFileName,
|
||||
const ::Alembic::AbcCoreAbstract::MetaData &iMetaData ) const;
|
||||
private:
|
||||
bool m_cacheHierarchy;
|
||||
};
|
||||
|
||||
//-*****************************************************************************
|
||||
//! AbcCoreHDF5 Provides a Cache implementation, that we expose here.
|
||||
//! It takes no arguments.
|
||||
//! This would only be used if you wished to create a global cache separately
|
||||
//! from an archive - this is actually fairly common, though, which is why
|
||||
//! it is exposed here.
|
||||
ALEMBIC_EXPORT ::Alembic::AbcCoreAbstract::ReadArraySampleCachePtr
|
||||
CreateCache( void );
|
||||
|
||||
//-*****************************************************************************
|
||||
//! Will return a shared pointer to the archive reader
|
||||
//! This version creates a cache associated with the archive.
|
||||
class ALEMBIC_EXPORT ReadArchive
|
||||
{
|
||||
public:
|
||||
ReadArchive();
|
||||
explicit ReadArchive( bool iCacheHierarchy );
|
||||
|
||||
// Make our own cache.
|
||||
::Alembic::AbcCoreAbstract::ArchiveReaderPtr
|
||||
operator()( const std::string &iFileName ) const;
|
||||
|
||||
// Take the given cache.
|
||||
::Alembic::AbcCoreAbstract::ArchiveReaderPtr
|
||||
operator()( const std::string &iFileName,
|
||||
::Alembic::AbcCoreAbstract::ReadArraySampleCachePtr iCache
|
||||
) const;
|
||||
private:
|
||||
bool m_cacheHierarchy;
|
||||
};
|
||||
|
||||
} // End namespace ALEMBIC_VERSION_NS
|
||||
|
||||
using namespace ALEMBIC_VERSION_NS;
|
||||
|
||||
} // End namespace AbcCoreHDF5
|
||||
} // End namespace Alembic
|
||||
|
||||
#endif
|
||||
|
||||
-453
@@ -1,453 +0,0 @@
|
||||
//-*****************************************************************************
|
||||
//
|
||||
// Copyright (c) 2009-2012,
|
||||
// Sony Pictures Imageworks Inc. and
|
||||
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Sony Pictures Imageworks, nor
|
||||
// Industrial Light & Magic, nor the names of their contributors may be used
|
||||
// to endorse or promote products derived from this software without specific
|
||||
// prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//-*****************************************************************************
|
||||
|
||||
#ifndef Alembic_AbcGeom_OGeomParam_h
|
||||
#define Alembic_AbcGeom_OGeomParam_h
|
||||
|
||||
#include <Alembic/AbcGeom/Foundation.h>
|
||||
#include <Alembic/AbcGeom/GeometryScope.h>
|
||||
|
||||
namespace Alembic {
|
||||
namespace AbcGeom {
|
||||
namespace ALEMBIC_VERSION_NS {
|
||||
|
||||
//-*****************************************************************************
|
||||
template <class TRAITS>
|
||||
class OTypedGeomParam
|
||||
{
|
||||
public:
|
||||
typedef typename TRAITS::value_type value_type;
|
||||
typedef OTypedArrayProperty<TRAITS> prop_type;
|
||||
|
||||
|
||||
//-*************************************************************************
|
||||
// inner class for setting
|
||||
class Sample
|
||||
{
|
||||
public:
|
||||
typedef Sample this_type;
|
||||
|
||||
Sample()
|
||||
: m_scope( kUnknownScope )
|
||||
{}
|
||||
|
||||
Sample( const Abc::TypedArraySample<TRAITS> &iVals,
|
||||
GeometryScope iScope )
|
||||
: m_vals( iVals )
|
||||
, m_scope( iScope )
|
||||
{}
|
||||
|
||||
Sample( const Abc::TypedArraySample<TRAITS> &iVals,
|
||||
const Abc::UInt32ArraySample &iIndices,
|
||||
GeometryScope iScope )
|
||||
: m_vals( iVals )
|
||||
, m_indices( iIndices )
|
||||
, m_scope ( iScope )
|
||||
{}
|
||||
|
||||
void setVals( const Abc::TypedArraySample<TRAITS> &iVals )
|
||||
{ m_vals = iVals; }
|
||||
const Abc::TypedArraySample<TRAITS> &getVals() const
|
||||
{ return m_vals; }
|
||||
|
||||
void setIndices( const Abc::UInt32ArraySample &iIndices )
|
||||
{ m_indices = iIndices; }
|
||||
const Abc::UInt32ArraySample &getIndices() const
|
||||
{ return m_indices; }
|
||||
|
||||
void setScope( GeometryScope iScope )
|
||||
{ m_scope = iScope; }
|
||||
GeometryScope getScope() const
|
||||
{ return m_scope; }
|
||||
|
||||
void reset()
|
||||
{
|
||||
m_vals.reset();
|
||||
m_indices.reset();
|
||||
m_scope = kUnknownScope;
|
||||
}
|
||||
|
||||
bool valid() const { return m_vals; }
|
||||
|
||||
ALEMBIC_OPERATOR_BOOL( valid() );
|
||||
|
||||
protected:
|
||||
Abc::TypedArraySample<TRAITS> m_vals;
|
||||
Abc::UInt32ArraySample m_indices;
|
||||
GeometryScope m_scope;
|
||||
};
|
||||
|
||||
//-*************************************************************************
|
||||
typedef OTypedGeomParam<TRAITS> this_type;
|
||||
typedef typename this_type::Sample sample_type;
|
||||
|
||||
static const char * getInterpretation()
|
||||
{
|
||||
return TRAITS::interpretation();
|
||||
}
|
||||
|
||||
static bool matches( const AbcA::PropertyHeader &iHeader,
|
||||
SchemaInterpMatching iMatching = kStrictMatching )
|
||||
{
|
||||
if ( iHeader.isCompound() )
|
||||
{
|
||||
return ( iHeader.getMetaData().get( "podName" ) ==
|
||||
Alembic::Util::PODName( TRAITS::dataType().getPod() ) &&
|
||||
( std::string() == getInterpretation() ||
|
||||
atoi(
|
||||
iHeader.getMetaData().get( "podExtent" ).c_str() ) ==
|
||||
TRAITS::dataType().getExtent() ) ) &&
|
||||
prop_type::matches( iHeader.getMetaData(), iMatching );
|
||||
}
|
||||
else if ( iHeader.isArray() )
|
||||
{
|
||||
return prop_type::matches( iHeader, iMatching );
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
OTypedGeomParam() {}
|
||||
|
||||
OTypedGeomParam( OCompoundProperty iParent,
|
||||
const std::string &iName,
|
||||
bool iIsIndexed,
|
||||
GeometryScope iScope,
|
||||
size_t iArrayExtent,
|
||||
const Argument &iArg0 = Argument(),
|
||||
const Argument &iArg1 = Argument(),
|
||||
const Argument &iArg2 = Argument()
|
||||
)
|
||||
: m_name( iName )
|
||||
, m_isIndexed( iIsIndexed )
|
||||
, m_scope( iScope )
|
||||
{
|
||||
*this = OTypedGeomParam( iParent.getPtr(), iName, iIsIndexed, iScope,
|
||||
iArrayExtent, iArg0, iArg1, iArg2 );
|
||||
}
|
||||
|
||||
OTypedGeomParam( AbcA::CompoundPropertyWriterPtr iParent,
|
||||
const std::string &iName,
|
||||
bool iIsIndexed,
|
||||
GeometryScope iScope,
|
||||
size_t iArrayExtent,
|
||||
const Argument &iArg0 = Argument(),
|
||||
const Argument &iArg1 = Argument(),
|
||||
const Argument &iArg2 = Argument()
|
||||
)
|
||||
: m_name( iName )
|
||||
, m_isIndexed( iIsIndexed )
|
||||
, m_scope( iScope )
|
||||
{
|
||||
Arguments args( Abc::GetErrorHandlerPolicy( iParent ) );
|
||||
iArg0.setInto( args );
|
||||
iArg1.setInto( args );
|
||||
iArg2.setInto( args );
|
||||
|
||||
AbcA::MetaData md = args.getMetaData();
|
||||
|
||||
SetGeometryScope( md, iScope );
|
||||
|
||||
md.set( "isGeomParam", "true" );
|
||||
|
||||
std::string podName( Alembic::Util::PODName(
|
||||
TRAITS::dataType().getPod() ) );
|
||||
|
||||
size_t extent = TRAITS::dataType().getExtent();
|
||||
|
||||
md.set( "podName", podName );
|
||||
|
||||
std::ostringstream extentStrm;
|
||||
extentStrm << extent;
|
||||
std::string extentStr = extentStrm.str();
|
||||
md.set( "podExtent", extentStr );
|
||||
|
||||
std::ostringstream arrayExtentStrm;
|
||||
arrayExtentStrm << iArrayExtent;
|
||||
std::string arrayExtentStr = arrayExtentStrm.str();
|
||||
md.set( "arrayExtent", arrayExtentStr );
|
||||
|
||||
md.set( "interpretation", TRAITS::interpretation() );
|
||||
|
||||
Abc::ErrorHandler::Policy ehp = args.getErrorHandlerPolicy();
|
||||
|
||||
AbcA::TimeSamplingPtr tsPtr = args.getTimeSampling();
|
||||
uint32_t tsIndex = args.getTimeSamplingIndex();
|
||||
|
||||
// if we specified a valid TimeSamplingPtr, use it to determine the
|
||||
// index otherwise we'll use the index, which defaults to the
|
||||
// intrinsic 0 index
|
||||
if (tsPtr)
|
||||
{
|
||||
AbcA::CompoundPropertyWriterPtr parent =
|
||||
GetCompoundPropertyWriterPtr( iParent );
|
||||
tsIndex =
|
||||
parent->getObject()->getArchive()->addTimeSampling(*tsPtr);
|
||||
}
|
||||
|
||||
if ( m_isIndexed )
|
||||
{
|
||||
m_cprop = Abc::OCompoundProperty( iParent, iName, md, ehp );
|
||||
|
||||
m_valProp = prop_type( m_cprop, ".vals", md, ehp, tsIndex );
|
||||
|
||||
m_indicesProperty = Abc::OUInt32ArrayProperty( m_cprop, ".indices",
|
||||
tsIndex );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_valProp = prop_type( iParent, iName, md, ehp, tsIndex );
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
void set( const sample_type &iSamp )
|
||||
{
|
||||
ALEMBIC_ABC_SAFE_CALL_BEGIN( "OTypedGeomParam::set()" );
|
||||
|
||||
if ( m_valProp.getNumSamples() == 0 )
|
||||
{
|
||||
m_valProp.set( iSamp.getVals() );
|
||||
if ( m_isIndexed ) { m_indicesProperty.set( iSamp.getIndices() ); }
|
||||
}
|
||||
else
|
||||
{
|
||||
SetPropUsePrevIfNull( m_valProp, iSamp.getVals() );
|
||||
if ( m_isIndexed )
|
||||
{
|
||||
SetPropUsePrevIfNull( m_indicesProperty, iSamp.getIndices() );
|
||||
}
|
||||
}
|
||||
|
||||
ALEMBIC_ABC_SAFE_CALL_END_RESET();
|
||||
}
|
||||
|
||||
void setFromPrevious()
|
||||
{
|
||||
ALEMBIC_ABC_SAFE_CALL_BEGIN( "OTypedGeomParam::setFromPrevious()" );
|
||||
|
||||
m_valProp.setFromPrevious();
|
||||
|
||||
if ( m_isIndexed ) { m_indicesProperty.setFromPrevious(); }
|
||||
|
||||
ALEMBIC_ABC_SAFE_CALL_END();
|
||||
}
|
||||
|
||||
void setTimeSampling( uint32_t iIndex )
|
||||
{
|
||||
ALEMBIC_ABC_SAFE_CALL_BEGIN(
|
||||
"OTypedGeomParam::setTimeSampling( uint32_t )" );
|
||||
|
||||
m_valProp.setTimeSampling( iIndex );
|
||||
|
||||
if ( m_isIndexed ) { m_indicesProperty.setTimeSampling( iIndex ); }
|
||||
|
||||
ALEMBIC_ABC_SAFE_CALL_END();
|
||||
}
|
||||
|
||||
void setTimeSampling( AbcA::TimeSamplingPtr iTime )
|
||||
{
|
||||
ALEMBIC_ABC_SAFE_CALL_BEGIN(
|
||||
"OTypedGeomParam::setTimeSampling( TimeSamplingPtr )" );
|
||||
|
||||
if (iTime)
|
||||
{
|
||||
uint32_t tsIndex =
|
||||
m_valProp.getParent().getObject().getArchive().addTimeSampling(
|
||||
*iTime);
|
||||
setTimeSampling( tsIndex );
|
||||
}
|
||||
|
||||
ALEMBIC_ABC_SAFE_CALL_END();
|
||||
}
|
||||
|
||||
size_t getNumSamples() const
|
||||
{
|
||||
ALEMBIC_ABC_SAFE_CALL_BEGIN( "OTypedGeomParam::getNumSamples()" );
|
||||
|
||||
if ( m_isIndexed )
|
||||
{
|
||||
if ( m_indicesProperty )
|
||||
{
|
||||
return std::max( m_indicesProperty.getNumSamples(),
|
||||
m_valProp.getNumSamples() );
|
||||
}
|
||||
else { return 0; }
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_valProp ) { return m_valProp.getNumSamples(); }
|
||||
else { return 0; }
|
||||
}
|
||||
|
||||
ALEMBIC_ABC_SAFE_CALL_END();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AbcA::DataType getDataType() const { return TRAITS::dataType(); }
|
||||
|
||||
bool isIndexed() const { return m_isIndexed; }
|
||||
|
||||
GeometryScope getScope() const { return m_scope; }
|
||||
|
||||
AbcA::TimeSamplingPtr getTimeSampling() const
|
||||
{
|
||||
return m_valProp.getTimeSampling();
|
||||
}
|
||||
|
||||
const std::string &getName() const { return m_name; }
|
||||
|
||||
bool valid() const
|
||||
{
|
||||
return ( m_valProp.valid()
|
||||
&& ( ( ! m_isIndexed ) || m_indicesProperty ) );
|
||||
}
|
||||
|
||||
ALEMBIC_OPERATOR_BOOL( this_type::valid() );
|
||||
|
||||
void reset()
|
||||
{
|
||||
m_name = "";
|
||||
m_valProp.reset();
|
||||
m_indicesProperty.reset();
|
||||
m_cprop.reset();
|
||||
m_scope = kUnknownScope;
|
||||
m_isIndexed = false;
|
||||
}
|
||||
|
||||
prop_type getValueProperty() const { return m_valProp; }
|
||||
|
||||
OUInt32ArrayProperty getIndexProperty() const { return m_indicesProperty; }
|
||||
|
||||
private:
|
||||
Abc::ErrorHandler &getErrorHandler() const
|
||||
{ return m_valProp.getErrorHandler(); }
|
||||
|
||||
protected:
|
||||
std::string m_name;
|
||||
|
||||
prop_type m_valProp;
|
||||
OUInt32ArrayProperty m_indicesProperty;
|
||||
bool m_isIndexed;
|
||||
|
||||
GeometryScope m_scope;
|
||||
|
||||
// if the GeomParam is not indexed, this will not exist.
|
||||
Abc::OCompoundProperty m_cprop;
|
||||
};
|
||||
|
||||
//-*****************************************************************************
|
||||
// TYPEDEFS
|
||||
//-*****************************************************************************
|
||||
|
||||
typedef OTypedGeomParam<BooleanTPTraits> OBoolGeomParam;
|
||||
typedef OTypedGeomParam<Uint8TPTraits> OUcharGeomParam;
|
||||
typedef OTypedGeomParam<Int8TPTraits> OCharGeomParam;
|
||||
typedef OTypedGeomParam<Uint16TPTraits> OUInt16GeomParam;
|
||||
typedef OTypedGeomParam<Int16TPTraits> OInt16GeomParam;
|
||||
typedef OTypedGeomParam<Uint32TPTraits> OUInt32GeomParam;
|
||||
typedef OTypedGeomParam<Int32TPTraits> OInt32GeomParam;
|
||||
typedef OTypedGeomParam<Uint64TPTraits> OUInt64GeomParam;
|
||||
typedef OTypedGeomParam<Int64TPTraits> OInt64GeomParam;
|
||||
typedef OTypedGeomParam<Float16TPTraits> OHalfGeomParam;
|
||||
typedef OTypedGeomParam<Float32TPTraits> OFloatGeomParam;
|
||||
typedef OTypedGeomParam<Float64TPTraits> ODoubleGeomParam;
|
||||
typedef OTypedGeomParam<StringTPTraits> OStringGeomParam;
|
||||
typedef OTypedGeomParam<WstringTPTraits> OWstringGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<V2sTPTraits> OV2sGeomParam;
|
||||
typedef OTypedGeomParam<V2iTPTraits> OV2iGeomParam;
|
||||
typedef OTypedGeomParam<V2fTPTraits> OV2fGeomParam;
|
||||
typedef OTypedGeomParam<V2dTPTraits> OV2dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<V3sTPTraits> OV3sGeomParam;
|
||||
typedef OTypedGeomParam<V3iTPTraits> OV3iGeomParam;
|
||||
typedef OTypedGeomParam<V3fTPTraits> OV3fGeomParam;
|
||||
typedef OTypedGeomParam<V3dTPTraits> OV3dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<P2sTPTraits> OP2sGeomParam;
|
||||
typedef OTypedGeomParam<P2iTPTraits> OP2iGeomParam;
|
||||
typedef OTypedGeomParam<P2fTPTraits> OP2fGeomParam;
|
||||
typedef OTypedGeomParam<P2dTPTraits> OP2dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<P3sTPTraits> OP3sGeomParam;
|
||||
typedef OTypedGeomParam<P3iTPTraits> OP3iGeomParam;
|
||||
typedef OTypedGeomParam<P3fTPTraits> OP3fGeomParam;
|
||||
typedef OTypedGeomParam<P3dTPTraits> OP3dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<Box2sTPTraits> OBox2sGeomParam;
|
||||
typedef OTypedGeomParam<Box2iTPTraits> OBox2iGeomParam;
|
||||
typedef OTypedGeomParam<Box2fTPTraits> OBox2fGeomParam;
|
||||
typedef OTypedGeomParam<Box2dTPTraits> OBox2dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<Box3sTPTraits> OBox3sGeomParam;
|
||||
typedef OTypedGeomParam<Box3iTPTraits> OBox3iGeomParam;
|
||||
typedef OTypedGeomParam<Box3fTPTraits> OBox3fGeomParam;
|
||||
typedef OTypedGeomParam<Box3dTPTraits> OBox3dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<M33fTPTraits> OM33fGeomParam;
|
||||
typedef OTypedGeomParam<M33dTPTraits> OM33dGeomParam;
|
||||
typedef OTypedGeomParam<M44fTPTraits> OM44fGeomParam;
|
||||
typedef OTypedGeomParam<M44dTPTraits> OM44dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<QuatfTPTraits> OQuatfGeomParam;
|
||||
typedef OTypedGeomParam<QuatdTPTraits> OQuatdGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<C3hTPTraits> OC3hGeomParam;
|
||||
typedef OTypedGeomParam<C3fTPTraits> OC3fGeomParam;
|
||||
typedef OTypedGeomParam<C3cTPTraits> OC3cGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<C4hTPTraits> OC4hGeomParam;
|
||||
typedef OTypedGeomParam<C4fTPTraits> OC4fGeomParam;
|
||||
typedef OTypedGeomParam<C4cTPTraits> OC4cGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<N2fTPTraits> ON2fGeomParam;
|
||||
typedef OTypedGeomParam<N2dTPTraits> ON2dGeomParam;
|
||||
|
||||
typedef OTypedGeomParam<N3fTPTraits> ON3fGeomParam;
|
||||
typedef OTypedGeomParam<N3dTPTraits> ON3dGeomParam;
|
||||
|
||||
} // End namespace ALEMBIC_VERSION_NS
|
||||
|
||||
using namespace ALEMBIC_VERSION_NS;
|
||||
|
||||
} // End namespace AbcGeom
|
||||
} // End namespace Alembic
|
||||
|
||||
#endif
|
||||
-513
File diff suppressed because it is too large
Load Diff
-549
File diff suppressed because it is too large
Load Diff
-302
@@ -1,302 +0,0 @@
|
||||
//-*****************************************************************************
|
||||
//
|
||||
// Copyright (c) 2009-2015,
|
||||
// Sony Pictures Imageworks Inc. and
|
||||
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Industrial Light & Magic nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//-*****************************************************************************
|
||||
|
||||
#ifndef Alembic_Util_Foundation_h
|
||||
#define Alembic_Util_Foundation_h
|
||||
|
||||
#include <Alembic/Util/Config.h>
|
||||
|
||||
#ifdef ALEMBIC_LIB_USES_BOOST
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/operators.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
// tr1 is not available in older versions of Visual Studio i.e. _MSC_VER <= 1600
|
||||
#elif defined(ALEMBIC_LIB_USES_TR1)
|
||||
#include <tr1/memory>
|
||||
#include <tr1/unordered_map>
|
||||
|
||||
// default to C++11
|
||||
#else
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <half.h>
|
||||
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <limits>
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <Alembic/Util/Export.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
// avoid windows min/max predefined macro conflicts
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
// needed for mutex stuff
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
// needed for std min/max
|
||||
#include <algorithm>
|
||||
|
||||
#ifndef ALEMBIC_VERSION_NS
|
||||
#define ALEMBIC_VERSION_NS v12
|
||||
#endif
|
||||
|
||||
namespace Alembic {
|
||||
namespace Util {
|
||||
namespace ALEMBIC_VERSION_NS {
|
||||
|
||||
// similiar to boost::noncopyable
|
||||
// explicitly hides copy construction and copy assignment
|
||||
class ALEMBIC_EXPORT noncopyable
|
||||
{
|
||||
protected:
|
||||
noncopyable() {}
|
||||
~noncopyable() {}
|
||||
|
||||
private:
|
||||
noncopyable( const noncopyable& );
|
||||
const noncopyable& operator=( const noncopyable& );
|
||||
};
|
||||
|
||||
#ifdef ALEMBIC_LIB_USES_BOOST
|
||||
using boost::dynamic_pointer_cast;
|
||||
using boost::enable_shared_from_this;
|
||||
using boost::shared_ptr;
|
||||
using boost::static_pointer_cast;
|
||||
using boost::weak_ptr;
|
||||
using boost::unordered_map;
|
||||
|
||||
#elif defined(ALEMBIC_LIB_USES_TR1)
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
using std::tr1::enable_shared_from_this;
|
||||
using std::tr1::shared_ptr;
|
||||
using std::tr1::static_pointer_cast;
|
||||
using std::tr1::weak_ptr;
|
||||
using std::tr1::unordered_map;
|
||||
|
||||
#else
|
||||
using std::dynamic_pointer_cast;
|
||||
using std::enable_shared_from_this;
|
||||
using std::shared_ptr;
|
||||
using std::static_pointer_cast;
|
||||
using std::weak_ptr;
|
||||
using std::unordered_map;
|
||||
using std::unique_ptr;
|
||||
#endif
|
||||
|
||||
#if defined(ALEMBIC_LIB_USES_BOOST) || defined(ALEMBIC_LIB_USES_TR1)
|
||||
|
||||
// define a very simple scoped ptr since unique_ptr isn't consistently
|
||||
// available on boost versions. Otherwise we could use boost::scoped_ptr
|
||||
// or the deprecated std::auto_ptr for tr1.
|
||||
template<typename T>
|
||||
class unique_ptr : noncopyable
|
||||
{
|
||||
public:
|
||||
unique_ptr()
|
||||
{
|
||||
p = NULL;
|
||||
}
|
||||
|
||||
unique_ptr( T* val ) : p(val)
|
||||
{
|
||||
}
|
||||
|
||||
~unique_ptr()
|
||||
{
|
||||
delete p;
|
||||
}
|
||||
|
||||
void reset( T* val )
|
||||
{
|
||||
delete p;
|
||||
p = val;
|
||||
}
|
||||
|
||||
T* operator->() const
|
||||
{
|
||||
return p;
|
||||
}
|
||||
private:
|
||||
T* p;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// similiar to boost::totally_ordered
|
||||
// only need < and == operators and this fills in the rest
|
||||
template < class T >
|
||||
class totally_ordered
|
||||
{
|
||||
friend bool operator > ( const T& x, const T& y )
|
||||
{
|
||||
return y < x;
|
||||
}
|
||||
|
||||
friend bool operator <= ( const T& x, const T& y )
|
||||
{
|
||||
return !( y < x );
|
||||
}
|
||||
|
||||
friend bool operator >= ( const T& x, const T& y )
|
||||
{
|
||||
return !( x < y );
|
||||
}
|
||||
|
||||
friend bool operator != ( const T& x, const T& y )
|
||||
{
|
||||
return !( x == y );
|
||||
}
|
||||
};
|
||||
|
||||
// inspired by boost::mutex
|
||||
#ifdef _MSC_VER
|
||||
|
||||
class mutex : noncopyable
|
||||
{
|
||||
public:
|
||||
mutex()
|
||||
{
|
||||
InitializeCriticalSection(&cs);
|
||||
}
|
||||
|
||||
~mutex()
|
||||
{
|
||||
DeleteCriticalSection(&cs);
|
||||
}
|
||||
|
||||
void lock()
|
||||
{
|
||||
EnterCriticalSection(&cs);
|
||||
}
|
||||
|
||||
void unlock()
|
||||
{
|
||||
LeaveCriticalSection(&cs);
|
||||
}
|
||||
|
||||
private:
|
||||
CRITICAL_SECTION cs;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
|
||||
class mutex : noncopyable
|
||||
{
|
||||
public:
|
||||
mutex()
|
||||
{
|
||||
pthread_mutex_init( &m, NULL );
|
||||
}
|
||||
|
||||
~mutex()
|
||||
{
|
||||
pthread_mutex_destroy( &m );
|
||||
}
|
||||
|
||||
void lock()
|
||||
{
|
||||
pthread_mutex_lock( &m );
|
||||
}
|
||||
|
||||
void unlock()
|
||||
{
|
||||
pthread_mutex_unlock( &m );
|
||||
}
|
||||
|
||||
private:
|
||||
pthread_mutex_t m;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
class scoped_lock : noncopyable
|
||||
{
|
||||
public:
|
||||
scoped_lock( mutex & l ) : m( l )
|
||||
{
|
||||
m.lock();
|
||||
}
|
||||
|
||||
~scoped_lock()
|
||||
{
|
||||
m.unlock();
|
||||
}
|
||||
|
||||
private:
|
||||
mutex & m;
|
||||
};
|
||||
|
||||
} // End namespace ALEMBIC_VERSION_NS
|
||||
|
||||
using namespace ALEMBIC_VERSION_NS;
|
||||
|
||||
} // End namespace Util
|
||||
} // End namespace Alembic
|
||||
|
||||
#endif
|
||||
@@ -1,390 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* Programmer: John Mainzer -- 4/19/06
|
||||
*
|
||||
* Purpose: This file contains declarations which are normally visible
|
||||
* only within the H5AC package (just H5AC.c at present).
|
||||
*
|
||||
* Source files outside the H5AC package should include
|
||||
* H5ACprivate.h instead.
|
||||
*
|
||||
* The one exception to this rule is testpar/t_cache.c. The
|
||||
* test code is easier to write if it can look at H5AC_aux_t.
|
||||
* Indeed, this is the main reason why this file was created.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef H5AC_PACKAGE
|
||||
#error "Do not include this file outside the H5AC package!"
|
||||
#endif
|
||||
|
||||
#ifndef _H5ACpkg_H
|
||||
#define _H5ACpkg_H
|
||||
|
||||
/* Get package's private header */
|
||||
#include "H5ACprivate.h" /* Metadata cache */
|
||||
|
||||
|
||||
/* Get needed headers */
|
||||
#include "H5Cprivate.h" /* Cache */
|
||||
#include "H5SLprivate.h" /* Skip lists */
|
||||
|
||||
|
||||
#define H5AC_DEBUG_DIRTY_BYTES_CREATION 0
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
|
||||
/* the following #defined are used to specify the operation required
|
||||
* at a sync point.
|
||||
*/
|
||||
|
||||
#define H5AC_SYNC_POINT_OP__FLUSH_TO_MIN_CLEAN 0
|
||||
#define H5AC_SYNC_POINT_OP__FLUSH_CACHE 1
|
||||
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* It is a bit difficult to set ranges of allowable values on the
|
||||
* dirty_bytes_threshold field of H5AC_aux_t. The following are
|
||||
* probably broader than they should be.
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define H5AC__MIN_DIRTY_BYTES_THRESHOLD (int32_t) \
|
||||
(H5C__MIN_MAX_CACHE_SIZE / 2)
|
||||
#define H5AC__DEFAULT_DIRTY_BYTES_THRESHOLD (256 * 1024)
|
||||
#define H5AC__MAX_DIRTY_BYTES_THRESHOLD (int32_t) \
|
||||
(H5C__MAX_MAX_CACHE_SIZE / 4)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* structure H5AC_aux_t
|
||||
*
|
||||
* While H5AC has become a wrapper for the cache implemented in H5C.c, there
|
||||
* are some features of the metadata cache that are specific to it, and which
|
||||
* therefore do not belong in the more generic H5C cache code.
|
||||
*
|
||||
* In particular, there is the matter of synchronizing writes from the
|
||||
* metadata cache to disk in the PHDF5 case.
|
||||
*
|
||||
* Prior to this update, the presumption was that all metadata caches would
|
||||
* write the same data at the same time since all operations modifying
|
||||
* metadata must be performed collectively. Given this assumption, it was
|
||||
* safe to allow only the writes from process 0 to actually make it to disk,
|
||||
* while metadata writes from all other processes were discarded.
|
||||
*
|
||||
* Unfortunately, this presumption is in error as operations that read
|
||||
* metadata need not be collective, but can change the location of dirty
|
||||
* entries in the metadata cache LRU lists. This can result in the same
|
||||
* metadata write operation triggering writes from the metadata caches on
|
||||
* some processes, but not all (causing a hang), or in different sets of
|
||||
* entries being written from different caches (potentially resulting in
|
||||
* metadata corruption in the file).
|
||||
*
|
||||
* To deal with this issue, I decided to apply a paradigm shift to the way
|
||||
* metadata is written to disk.
|
||||
*
|
||||
* With this set of changes, only the metadata cache on process 0 is able
|
||||
* to write metadata to disk, although metadata caches on all other
|
||||
* processes can read metadata from disk as before.
|
||||
*
|
||||
* To keep all the other caches from getting plugged up with dirty metadata,
|
||||
* process 0 periodically broadcasts a list of entries that it has flushed
|
||||
* since that last notice, and which are currently clean. The other caches
|
||||
* mark these entries as clean as well, which allows them to evict the
|
||||
* entries as needed.
|
||||
*
|
||||
* One obvious problem in this approach is synchronizing the broadcasts
|
||||
* and receptions, as different caches may see different amounts of
|
||||
* activity.
|
||||
*
|
||||
* The current solution is for the caches to track the number of bytes
|
||||
* of newly generated dirty metadata, and to broadcast and receive
|
||||
* whenever this value exceeds some user specified threshold.
|
||||
*
|
||||
* Maintaining this count is easy for all processes not on process 0 --
|
||||
* all that is necessary is to add the size of the entry to the total
|
||||
* whenever there is an insertion, a move of a previously clean entry,
|
||||
* or whever a previously clean entry is marked dirty in an unprotect.
|
||||
*
|
||||
* On process 0, we have to be careful not to count dirty bytes twice.
|
||||
* If an entry is marked dirty, flushed, and marked dirty again, all
|
||||
* within a single reporting period, it only th first marking should
|
||||
* be added to the dirty bytes generated tally, as that is all that
|
||||
* the other processes will see.
|
||||
*
|
||||
* At present, this structure exists to maintain the fields needed to
|
||||
* implement the above scheme, and thus is only used in the parallel
|
||||
* case. However, other uses may arise in the future.
|
||||
*
|
||||
* Instance of this structure are associated with metadata caches via
|
||||
* the aux_ptr field of H5C_t (see H5Cpkg.h). The H5AC code is
|
||||
* responsible for allocating, maintaining, and discarding instances
|
||||
* of H5AC_aux_t.
|
||||
*
|
||||
* The remainder of this header comments documents the individual fields
|
||||
* of the structure.
|
||||
*
|
||||
* JRM - 6/27/05
|
||||
*
|
||||
* magic: Unsigned 32 bit integer always set to
|
||||
* H5AC__H5AC_AUX_T_MAGIC. This field is used to validate
|
||||
* pointers to instances of H5AC_aux_t.
|
||||
*
|
||||
* mpi_comm: MPI communicator associated with the file for which the
|
||||
* cache has been created.
|
||||
*
|
||||
* mpi_rank: MPI rank of this process within mpi_comm.
|
||||
*
|
||||
* mpi_size: Number of processes in mpi_comm.
|
||||
*
|
||||
* write_permitted: Boolean flag used to control whether the cache
|
||||
* is permitted to write to file.
|
||||
*
|
||||
* dirty_bytes_threshold: Integer field containing the dirty bytes
|
||||
* generation threashold. Whenever dirty byte creation
|
||||
* exceeds this value, the metadata cache on process 0
|
||||
* broadcasts a list of the entries it has flushed since
|
||||
* the last broadcast (or since the beginning of execution)
|
||||
* and which are currently clean (if they are still in the
|
||||
* cache)
|
||||
*
|
||||
* Similarly, metadata caches on processes other than process
|
||||
* 0 will attempt to receive a list of clean entries whenever
|
||||
* the threshold is exceeded.
|
||||
*
|
||||
* dirty_bytes: Integer field containing the number of bytes of dirty
|
||||
* metadata generated since the beginning of the computation,
|
||||
* or (more typically) since the last clean entries list
|
||||
* broadcast. This field is reset to zero after each such
|
||||
* broadcast.
|
||||
*
|
||||
* metadata_write_strategy: Integer code indicating how we will be
|
||||
* writing the metadata. In the first incarnation of
|
||||
* this code, all writes were done from process 0. This
|
||||
* field exists to facilitate experiments with other
|
||||
* strategies.
|
||||
*
|
||||
* dirty_bytes_propagations: This field only exists when the
|
||||
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
|
||||
*
|
||||
* It is used to track the number of times the cleaned list
|
||||
* has been propagated from process 0 to the other
|
||||
* processes.
|
||||
*
|
||||
* unprotect_dirty_bytes: This field only exists when the
|
||||
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
|
||||
*
|
||||
* It is used to track the number of dirty bytes created
|
||||
* via unprotect operations since the last time the cleaned
|
||||
* list was propagated.
|
||||
*
|
||||
* unprotect_dirty_bytes_updates: This field only exists when the
|
||||
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
|
||||
*
|
||||
* It is used to track the number of times dirty bytes have
|
||||
* been created via unprotect operations since the last time
|
||||
* the cleaned list was propagated.
|
||||
*
|
||||
* insert_dirty_bytes: This field only exists when the
|
||||
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
|
||||
*
|
||||
* It is used to track the number of dirty bytes created
|
||||
* via insert operations since the last time the cleaned
|
||||
* list was propagated.
|
||||
*
|
||||
* insert_dirty_bytes_updates: This field only exists when the
|
||||
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
|
||||
*
|
||||
* It is used to track the number of times dirty bytes have
|
||||
* been created via insert operations since the last time
|
||||
* the cleaned list was propagated.
|
||||
*
|
||||
* move_dirty_bytes: This field only exists when the
|
||||
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
|
||||
*
|
||||
* It is used to track the number of dirty bytes created
|
||||
* via move operations since the last time the cleaned
|
||||
* list was propagated.
|
||||
*
|
||||
* move_dirty_bytes_updates: This field only exists when the
|
||||
* H5AC_DEBUG_DIRTY_BYTES_CREATION #define is TRUE.
|
||||
*
|
||||
* It is used to track the number of times dirty bytes have
|
||||
* been created via move operations since the last time
|
||||
* the cleaned list was propagated.
|
||||
*
|
||||
* Things have changed a bit since the following four fields were defined.
|
||||
* If metadata_write_strategy is H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY,
|
||||
* all comments hold as before -- with the caviate that pending further
|
||||
* coding, the process 0 metadata cache is forbidden to flush entries outside
|
||||
* of a sync point.
|
||||
*
|
||||
* However, for different metadata write strategies, these fields are used
|
||||
* only to maintain the correct dirty byte count on process zero -- and in
|
||||
* most if not all cases, this is redundant, as process zero will be barred
|
||||
* from flushing entries outside of a sync point.
|
||||
*
|
||||
* JRM -- 3/16/10
|
||||
*
|
||||
* d_slist_ptr: Pointer to an instance of H5SL_t used to maintain a list
|
||||
* of entries that have been dirtied since the last time they
|
||||
* were listed in a clean entries broadcast. This list is
|
||||
* only maintained by the metadata cache on process 0 -- it
|
||||
* it used to maintain a view of the dirty entries as seen
|
||||
* by the other caches, so as to keep the dirty bytes count
|
||||
* in synchronization with them.
|
||||
*
|
||||
* Thus on process 0, the dirty_bytes count is incremented
|
||||
* only if either
|
||||
*
|
||||
* 1) an entry is inserted in the metadata cache, or
|
||||
*
|
||||
* 2) a previously clean entry is moved, and it does not
|
||||
* already appear in the dirty entry list, or
|
||||
*
|
||||
* 3) a previously clean entry is unprotected with the
|
||||
* dirtied flag set and the entry does not already appear
|
||||
* in the dirty entry list.
|
||||
*
|
||||
* Entries are added to the dirty entry list whever they cause
|
||||
* the dirty bytes count to be increased. They are removed
|
||||
* when they appear in a clean entries broadcast. Note that
|
||||
* moves must be reflected in the dirty entry list.
|
||||
*
|
||||
* To reitterate, this field is only used on process 0 -- it
|
||||
* should be NULL on all other processes.
|
||||
*
|
||||
* d_slist_len: Integer field containing the number of entries in the
|
||||
* dirty entry list. This field should always contain the
|
||||
* value 0 on all processes other than process 0. It exists
|
||||
* primarily for sanity checking.
|
||||
*
|
||||
* c_slist_ptr: Pointer to an instance of H5SL_t used to maintain a list
|
||||
* of entries that were dirty, have been flushed
|
||||
* to disk since the last clean entries broadcast, and are
|
||||
* still clean. Since only process 0 can write to disk, this
|
||||
* list only exists on process 0.
|
||||
*
|
||||
* In essence, this slist is used to assemble the contents of
|
||||
* the next clean entries broadcast. The list emptied after
|
||||
* each broadcast.
|
||||
*
|
||||
* c_slist_len: Integer field containing the number of entries in the clean
|
||||
* entries list (*c_slist_ptr). This field should always
|
||||
* contain the value 0 on all processes other than process 0.
|
||||
* It exists primarily for sanity checking.
|
||||
*
|
||||
* The following two fields are used only when metadata_write_strategy
|
||||
* is H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
|
||||
*
|
||||
* candidate_slist_ptr: Pointer to an instance of H5SL_t used by process 0
|
||||
* to construct a list of entries to be flushed at this sync
|
||||
* point. This list is then broadcast to the other processes,
|
||||
* which then either flush or mark clean all entries on it.
|
||||
*
|
||||
* candidate_slist_len: Integer field containing the number of entries on the
|
||||
* candidate list. It exists primarily for sanity checking.
|
||||
*
|
||||
* write_done: In the parallel test bed, it is necessary to ensure that
|
||||
* all writes to the server process from cache 0 complete
|
||||
* before it enters the barrier call with the other caches.
|
||||
*
|
||||
* The write_done callback allows t_cache to do this without
|
||||
* requiring an ACK on each write. Since these ACKs greatly
|
||||
* increase the run time on some platforms, this is a
|
||||
* significant optimization.
|
||||
*
|
||||
* This field must be set to NULL when the callback is not
|
||||
* needed.
|
||||
*
|
||||
* Note: This field has been extended for use by all processes
|
||||
* with the addition of support for the distributed
|
||||
* metadata write strategy.
|
||||
* JRM -- 5/9/10
|
||||
*
|
||||
* sync_point_done: In the parallel test bed, it is necessary to verify
|
||||
* that the expected writes, and only the expected writes,
|
||||
* have taken place at the end of each sync point.
|
||||
*
|
||||
* The sync_point_done callback allows t_cache to perform
|
||||
* this verification. The field is set to NULL when the
|
||||
* callback is not needed.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
|
||||
#define H5AC__H5AC_AUX_T_MAGIC (unsigned)0x00D0A01
|
||||
|
||||
typedef struct H5AC_aux_t
|
||||
{
|
||||
uint32_t magic;
|
||||
|
||||
MPI_Comm mpi_comm;
|
||||
|
||||
int mpi_rank;
|
||||
|
||||
int mpi_size;
|
||||
|
||||
hbool_t write_permitted;
|
||||
|
||||
int32_t dirty_bytes_threshold;
|
||||
|
||||
int32_t dirty_bytes;
|
||||
|
||||
int32_t metadata_write_strategy;
|
||||
|
||||
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
|
||||
|
||||
int32_t dirty_bytes_propagations;
|
||||
|
||||
int32_t unprotect_dirty_bytes;
|
||||
int32_t unprotect_dirty_bytes_updates;
|
||||
|
||||
int32_t insert_dirty_bytes;
|
||||
int32_t insert_dirty_bytes_updates;
|
||||
|
||||
int32_t move_dirty_bytes;
|
||||
int32_t move_dirty_bytes_updates;
|
||||
|
||||
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
|
||||
|
||||
H5SL_t * d_slist_ptr;
|
||||
|
||||
int32_t d_slist_len;
|
||||
|
||||
H5SL_t * c_slist_ptr;
|
||||
|
||||
int32_t c_slist_len;
|
||||
|
||||
H5SL_t * candidate_slist_ptr;
|
||||
|
||||
int32_t candidate_slist_len;
|
||||
|
||||
void (* write_done)(void);
|
||||
|
||||
void (* sync_point_done)(int num_writes,
|
||||
haddr_t * written_entries_tbl);
|
||||
|
||||
} H5AC_aux_t; /* struct H5AC_aux_t */
|
||||
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
|
||||
#endif /* _H5ACpkg_H */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,280 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* Programmer: Quincey Koziol
|
||||
* Monday, Apr 20
|
||||
*
|
||||
* Purpose: This file contains declarations which are visible only within
|
||||
* the H5A package. Source files outside the H5A package should
|
||||
* include H5Aprivate.h instead.
|
||||
*/
|
||||
#ifndef H5A_PACKAGE
|
||||
#error "Do not include this file outside the H5A package!"
|
||||
#endif
|
||||
|
||||
#ifndef _H5Apkg_H
|
||||
#define _H5Apkg_H
|
||||
|
||||
/*
|
||||
* Define this to enable debugging.
|
||||
*/
|
||||
#ifdef NDEBUG
|
||||
# undef H5A_DEBUG
|
||||
#endif
|
||||
|
||||
/* Get package's private header */
|
||||
#include "H5Aprivate.h"
|
||||
|
||||
/* Other private headers needed by this file */
|
||||
#include "H5B2private.h" /* v2 B-trees */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5HFprivate.h" /* Fractal heaps */
|
||||
#include "H5Oprivate.h" /* Object headers */
|
||||
#include "H5Sprivate.h" /* Dataspace */
|
||||
#include "H5Tprivate.h" /* Datatype functions */
|
||||
|
||||
|
||||
/**************************/
|
||||
/* Package Private Macros */
|
||||
/**************************/
|
||||
|
||||
/* This is the initial version, which does not have support for shared datatypes */
|
||||
#define H5O_ATTR_VERSION_1 1
|
||||
|
||||
/* This version allows support for shared datatypes & dataspaces by adding a
|
||||
* 'flag' byte indicating when those components are shared. This version
|
||||
* also dropped the alignment on all the components.
|
||||
*/
|
||||
#define H5O_ATTR_VERSION_2 2
|
||||
|
||||
/* Add support for different character encodings of attribute names */
|
||||
#define H5O_ATTR_VERSION_3 3
|
||||
|
||||
/* The latest version of the format. Look through the 'encode', 'decode'
|
||||
* and 'size' message callbacks for places to change when updating this.
|
||||
*/
|
||||
#define H5O_ATTR_VERSION_LATEST H5O_ATTR_VERSION_3
|
||||
|
||||
|
||||
/****************************/
|
||||
/* Package Private Typedefs */
|
||||
/****************************/
|
||||
/* Define the shared attribute structure */
|
||||
typedef struct H5A_shared_t {
|
||||
uint8_t version; /* Version to encode attribute with */
|
||||
|
||||
char *name; /* Attribute's name */
|
||||
H5T_cset_t encoding; /* Character encoding of attribute name */
|
||||
|
||||
H5T_t *dt; /* Attribute's datatype */
|
||||
size_t dt_size; /* Size of datatype on disk */
|
||||
|
||||
H5S_t *ds; /* Attribute's dataspace */
|
||||
size_t ds_size; /* Size of dataspace on disk */
|
||||
|
||||
void *data; /* Attribute data (on a temporary basis) */
|
||||
size_t data_size; /* Size of data on disk */
|
||||
H5O_msg_crt_idx_t crt_idx; /* Attribute's creation index in the object header */
|
||||
unsigned nrefs; /* Ref count for times this object is refered */
|
||||
} H5A_shared_t;
|
||||
|
||||
/* Define the main attribute structure */
|
||||
struct H5A_t {
|
||||
H5O_shared_t sh_loc; /* Shared message info (must be first) */
|
||||
H5O_loc_t oloc; /* Object location for object attribute is on */
|
||||
hbool_t obj_opened; /* Object header entry opened? */
|
||||
H5G_name_t path; /* Group hierarchy path */
|
||||
H5A_shared_t *shared; /* Shared attribute information */
|
||||
};
|
||||
|
||||
/* Typedefs for "dense" attribute storage */
|
||||
/* (fractal heap & v2 B-tree info) */
|
||||
|
||||
/* Typedef for native 'name' field index records in the v2 B-tree */
|
||||
/* (Keep 'id' field first so generic record handling in callbacks works) */
|
||||
typedef struct H5A_dense_bt2_name_rec_t {
|
||||
H5O_fheap_id_t id; /* Heap ID for attribute */
|
||||
uint8_t flags; /* Object header message flags for attribute */
|
||||
H5O_msg_crt_idx_t corder; /* 'creation order' field value */
|
||||
uint32_t hash; /* Hash of 'name' field value */
|
||||
} H5A_dense_bt2_name_rec_t;
|
||||
|
||||
/* Typedef for native 'creation order' field index records in the v2 B-tree */
|
||||
/* (Keep 'id' field first so generic record handling in callbacks works) */
|
||||
typedef struct H5A_dense_bt2_corder_rec_t {
|
||||
H5O_fheap_id_t id; /* Heap ID for attribute */
|
||||
uint8_t flags; /* Object header message flags for attribute */
|
||||
H5O_msg_crt_idx_t corder; /* 'creation order' field value */
|
||||
} H5A_dense_bt2_corder_rec_t;
|
||||
|
||||
/* Define the 'found' callback function pointer for matching an attribute record in a v2 B-tree */
|
||||
typedef herr_t (*H5A_bt2_found_t)(const H5A_t *attr, hbool_t *took_ownership, void *op_data);
|
||||
|
||||
/*
|
||||
* Common data exchange structure for dense attribute storage. This structure
|
||||
* is passed through the v2 B-tree layer to the methods for the objects
|
||||
* to which the v2 B-tree points.
|
||||
*/
|
||||
typedef struct H5A_bt2_ud_common_t {
|
||||
/* downward */
|
||||
H5F_t *f; /* Pointer to file that fractal heap is in */
|
||||
hid_t dxpl_id; /* DXPL for operation */
|
||||
H5HF_t *fheap; /* Fractal heap handle */
|
||||
H5HF_t *shared_fheap; /* Fractal heap handle for shared messages */
|
||||
const char *name; /* Name of attribute to compare */
|
||||
uint32_t name_hash; /* Hash of name of attribute to compare */
|
||||
uint8_t flags; /* Flags for attribute storage location */
|
||||
H5O_msg_crt_idx_t corder; /* Creation order value of attribute to compare */
|
||||
H5A_bt2_found_t found_op; /* Callback when correct attribute is found */
|
||||
void *found_op_data; /* Callback data when correct attribute is found */
|
||||
} H5A_bt2_ud_common_t;
|
||||
|
||||
/*
|
||||
* Data exchange structure for dense attribute storage. This structure is
|
||||
* passed through the v2 B-tree layer when inserting attributes.
|
||||
*/
|
||||
typedef struct H5A_bt2_ud_ins_t {
|
||||
/* downward */
|
||||
H5A_bt2_ud_common_t common; /* Common info for B-tree user data (must be first) */
|
||||
H5O_fheap_id_t id; /* Heap ID of attribute to insert */
|
||||
} H5A_bt2_ud_ins_t;
|
||||
|
||||
/* Data structure to hold table of attributes for an object */
|
||||
typedef struct {
|
||||
size_t nattrs; /* # of attributes in table */
|
||||
H5A_t **attrs; /* Pointer to array of attribute pointers */
|
||||
} H5A_attr_table_t;
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Package Private Variables */
|
||||
/*****************************/
|
||||
|
||||
/* Declare extern the free list for H5A_t's */
|
||||
H5FL_EXTERN(H5A_t);
|
||||
|
||||
/* Declare the external free lists for H5A_shared_t's */
|
||||
H5FL_EXTERN(H5A_shared_t);
|
||||
|
||||
/* Declare extern a free list to manage blocks of type conversion data */
|
||||
H5FL_BLK_EXTERN(attr_buf);
|
||||
|
||||
/* The v2 B-tree class for indexing 'name' field on attributes */
|
||||
H5_DLLVAR const H5B2_class_t H5A_BT2_NAME[1];
|
||||
|
||||
/* The v2 B-tree class for indexing 'creation order' field on attributes */
|
||||
H5_DLLVAR const H5B2_class_t H5A_BT2_CORDER[1];
|
||||
|
||||
|
||||
/******************************/
|
||||
/* Package Private Prototypes */
|
||||
/******************************/
|
||||
|
||||
/* Function prototypes for H5A package scope */
|
||||
H5_DLL herr_t H5A_init(void);
|
||||
H5_DLL herr_t H5A__term_deprec_interface(void);
|
||||
H5_DLL H5A_t *H5A_create(const H5G_loc_t *loc, const char *name,
|
||||
const H5T_t *type, const H5S_t *space, hid_t acpl_id, hid_t dxpl_id);
|
||||
H5_DLL H5A_t *H5A_open_by_name(const H5G_loc_t *loc, const char *obj_name,
|
||||
const char *attr_name, hid_t lapl_id, hid_t dxpl_id);
|
||||
H5_DLL H5A_t *H5A_open_by_idx(const H5G_loc_t *loc, const char *obj_name,
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5A_open_common(const H5G_loc_t *loc, H5A_t *attr);
|
||||
H5_DLL herr_t H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id);
|
||||
H5_DLL ssize_t H5A_get_name(H5A_t *attr, size_t buf_size, char *buf);
|
||||
H5_DLL H5A_t *H5A_copy(H5A_t *new_attr, const H5A_t *old_attr);
|
||||
H5_DLL herr_t H5A_get_info(const H5A_t *attr, H5A_info_t *ainfo);
|
||||
H5_DLL hid_t H5A_get_create_plist(H5A_t* attr);
|
||||
H5_DLL herr_t H5A_free(H5A_t *attr);
|
||||
H5_DLL herr_t H5A_close(H5A_t *attr);
|
||||
H5_DLL htri_t H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo);
|
||||
H5_DLL herr_t H5A_set_version(const H5F_t *f, H5A_t *attr);
|
||||
H5_DLL herr_t H5A_rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_name,
|
||||
const char *new_attr_name, hid_t lapl_id, hid_t dxpl_id);
|
||||
H5_DLL htri_t H5A_exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name,
|
||||
hid_t lapl_id, hid_t dxpl_id);
|
||||
|
||||
/* Attribute "dense" storage routines */
|
||||
H5_DLL herr_t H5A_dense_create(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo);
|
||||
H5_DLL H5A_t *H5A_dense_open(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
|
||||
const char *name);
|
||||
H5_DLL herr_t H5A_dense_insert(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
|
||||
H5A_t *attr);
|
||||
H5_DLL herr_t H5A_dense_write(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
|
||||
H5A_t *attr);
|
||||
H5_DLL herr_t H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
|
||||
const char *old_name, const char *new_name);
|
||||
H5_DLL herr_t H5A_dense_iterate(H5F_t *f, hid_t dxpl_id, hid_t loc_id,
|
||||
const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
|
||||
hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op,
|
||||
void *op_data);
|
||||
H5_DLL herr_t H5A_dense_remove(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
|
||||
const char *name);
|
||||
H5_DLL herr_t H5A_dense_remove_by_idx(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n);
|
||||
H5_DLL htri_t H5A_dense_exists(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo,
|
||||
const char *name);
|
||||
H5_DLL herr_t H5A_dense_delete(H5F_t *f, hid_t dxpl_id, H5O_ainfo_t *ainfo);
|
||||
|
||||
|
||||
/* Attribute table operations */
|
||||
H5_DLL herr_t H5A_compact_build_table(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
||||
H5_index_t idx_type, H5_iter_order_t order, H5A_attr_table_t *atable);
|
||||
H5_DLL herr_t H5A_dense_build_table(H5F_t *f, hid_t dxpl_id,
|
||||
const H5O_ainfo_t *ainfo, H5_index_t idx_type, H5_iter_order_t order,
|
||||
H5A_attr_table_t *atable);
|
||||
H5_DLL herr_t H5A_attr_iterate_table(const H5A_attr_table_t *atable,
|
||||
hsize_t skip, hsize_t *last_attr, hid_t loc_id,
|
||||
const H5A_attr_iter_op_t *attr_op, void *op_data);
|
||||
H5_DLL herr_t H5A_attr_release_table(H5A_attr_table_t *atable);
|
||||
|
||||
/* Attribute operations */
|
||||
H5_DLL herr_t H5O_attr_create(const H5O_loc_t *loc, hid_t dxpl_id, H5A_t *attr);
|
||||
H5_DLL H5A_t *H5O_attr_open_by_name(const H5O_loc_t *loc, const char *name,
|
||||
hid_t dxpl_id);
|
||||
H5_DLL H5A_t *H5O_attr_open_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
|
||||
H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5O_attr_update_shared(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
||||
H5A_t *attr, H5O_shared_t *sh_mesg);
|
||||
H5_DLL herr_t H5O_attr_write(const H5O_loc_t *loc, hid_t dxpl_id,
|
||||
H5A_t *attr);
|
||||
H5_DLL herr_t H5O_attr_rename(const H5O_loc_t *loc, hid_t dxpl_id,
|
||||
const char *old_name, const char *new_name);
|
||||
H5_DLL herr_t H5O_attr_remove(const H5O_loc_t *loc, const char *name,
|
||||
hid_t dxpl_id);
|
||||
H5_DLL herr_t H5O_attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
|
||||
H5_iter_order_t order, hsize_t n, hid_t dxpl_id);
|
||||
H5_DLL htri_t H5O_attr_exists(const H5O_loc_t *loc, const char *name, hid_t dxpl_id);
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
H5_DLL int H5O_attr_count(const H5O_loc_t *loc, hid_t dxpl_id);
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
H5_DLL H5A_t *H5A_attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
|
||||
H5O_copy_t *cpy_info, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5A_attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src,
|
||||
H5O_loc_t *dst_oloc, const H5A_t *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
|
||||
H5_DLL herr_t H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t * ainfo_src,
|
||||
H5O_loc_t *dst_oloc, H5O_ainfo_t *ainfo_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
|
||||
|
||||
|
||||
/* Testing functions */
|
||||
#ifdef H5A_TESTING
|
||||
H5_DLL htri_t H5A_is_shared_test(hid_t aid);
|
||||
H5_DLL herr_t H5A_get_shared_rc_test(hid_t attr_id, hsize_t *ref_count);
|
||||
#endif /* H5A_TESTING */
|
||||
|
||||
#endif /* _H5Apkg_H */
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This file contains public declarations for the H5A module.
|
||||
*/
|
||||
#ifndef _H5Apublic_H
|
||||
#define _H5Apublic_H
|
||||
|
||||
/* Public headers needed by this file */
|
||||
#include "H5Ipublic.h" /* IDs */
|
||||
#include "H5Opublic.h" /* Object Headers */
|
||||
#include "H5Tpublic.h" /* Datatypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */
|
||||
typedef struct {
|
||||
hbool_t corder_valid; /* Indicate if creation order is valid */
|
||||
H5O_msg_crt_idx_t corder; /* Creation order */
|
||||
H5T_cset_t cset; /* Character set of attribute name */
|
||||
hsize_t data_size; /* Size of raw data */
|
||||
} H5A_info_t;
|
||||
|
||||
/* Typedef for H5Aiterate2() callbacks */
|
||||
typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
|
||||
const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
|
||||
|
||||
/* Public function prototypes */
|
||||
H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
|
||||
hid_t space_id, hid_t acpl_id, hid_t aapl_id);
|
||||
H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
|
||||
hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id);
|
||||
H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id);
|
||||
H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name,
|
||||
const char *attr_name, hid_t aapl_id, hid_t lapl_id);
|
||||
H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name,
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id,
|
||||
hid_t lapl_id);
|
||||
H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf);
|
||||
H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf);
|
||||
H5_DLL herr_t H5Aclose(hid_t attr_id);
|
||||
H5_DLL hid_t H5Aget_space(hid_t attr_id);
|
||||
H5_DLL hid_t H5Aget_type(hid_t attr_id);
|
||||
H5_DLL hid_t H5Aget_create_plist(hid_t attr_id);
|
||||
H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
|
||||
H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name,
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
|
||||
char *name /*out*/, size_t size, hid_t lapl_id);
|
||||
H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id);
|
||||
H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/);
|
||||
H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name,
|
||||
const char *attr_name, H5A_info_t *ainfo /*out*/, hid_t lapl_id);
|
||||
H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name,
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n,
|
||||
H5A_info_t *ainfo /*out*/, hid_t lapl_id);
|
||||
H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name);
|
||||
H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name,
|
||||
const char *old_attr_name, const char *new_attr_name, hid_t lapl_id);
|
||||
H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type,
|
||||
H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data);
|
||||
H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
|
||||
H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data,
|
||||
hid_t lapd_id);
|
||||
H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name);
|
||||
H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name,
|
||||
const char *attr_name, hid_t lapl_id);
|
||||
H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name,
|
||||
H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id);
|
||||
H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name);
|
||||
H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name,
|
||||
const char *attr_name, hid_t lapl_id);
|
||||
|
||||
/* Symbols defined for compatibility with previous versions of the HDF5 API.
|
||||
*
|
||||
* Use of these symbols is deprecated.
|
||||
*/
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
|
||||
/* Macros */
|
||||
|
||||
|
||||
/* Typedefs */
|
||||
|
||||
/* Typedef for H5Aiterate1() callbacks */
|
||||
typedef herr_t (*H5A_operator1_t)(hid_t location_id/*in*/,
|
||||
const char *attr_name/*in*/, void *operator_data/*in,out*/);
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id,
|
||||
hid_t space_id, hid_t acpl_id);
|
||||
H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name);
|
||||
H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx);
|
||||
H5_DLL int H5Aget_num_attrs(hid_t loc_id);
|
||||
H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op,
|
||||
void *op_data);
|
||||
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _H5Apublic_H */
|
||||
|
||||
@@ -1,378 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
|
||||
* Monday, January 31, 2005
|
||||
*
|
||||
* Purpose: This file contains declarations which are visible only within
|
||||
* the H5B2 package. Source files outside the H5B2 package should
|
||||
* include H5B2private.h instead.
|
||||
*/
|
||||
#ifndef H5B2_PACKAGE
|
||||
#error "Do not include this file outside the H5B2 package!"
|
||||
#endif
|
||||
|
||||
#ifndef _H5B2pkg_H
|
||||
#define _H5B2pkg_H
|
||||
|
||||
/* Get package's private header */
|
||||
#include "H5B2private.h"
|
||||
|
||||
/* Other private headers needed by this file */
|
||||
#include "H5ACprivate.h" /* Metadata cache */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
|
||||
|
||||
/**************************/
|
||||
/* Package Private Macros */
|
||||
/**************************/
|
||||
|
||||
/* Size of storage for number of records per node (on disk) */
|
||||
#define H5B2_SIZEOF_RECORDS_PER_NODE (unsigned)2
|
||||
|
||||
/* Size of a "tree pointer" (on disk) */
|
||||
/* (essentially, the largest internal pointer allowed) */
|
||||
#define H5B2_TREE_POINTER_SIZE(h) ( \
|
||||
(h)->sizeof_addr + \
|
||||
H5B2_SIZEOF_RECORDS_PER_NODE + \
|
||||
(h)->sizeof_size \
|
||||
)
|
||||
|
||||
/* Size of a internal node pointer (on disk) */
|
||||
#define H5B2_INT_POINTER_SIZE(h, d) ( \
|
||||
(unsigned)(h)->sizeof_addr /* Address of child node */ \
|
||||
+ (h)->max_nrec_size /* # of records in child node */ \
|
||||
+ (h)->node_info[(d) - 1].cum_max_nrec_size /* Total # of records in child & below */ \
|
||||
)
|
||||
|
||||
/* Size of checksum information (on disk) */
|
||||
#define H5B2_SIZEOF_CHKSUM 4
|
||||
|
||||
/* Format overhead for all v2 B-tree metadata in the file */
|
||||
#define H5B2_METADATA_PREFIX_SIZE ( \
|
||||
(unsigned)H5_SIZEOF_MAGIC /* Signature */ \
|
||||
+ (unsigned)1 /* Version */ \
|
||||
+ (unsigned)1 /* Tree type */ \
|
||||
+ (unsigned)H5B2_SIZEOF_CHKSUM /* Metadata checksum */ \
|
||||
)
|
||||
|
||||
/* Size of the v2 B-tree header on disk */
|
||||
#define H5B2_HEADER_SIZE(h) ( \
|
||||
/* General metadata fields */ \
|
||||
H5B2_METADATA_PREFIX_SIZE \
|
||||
\
|
||||
/* Header specific fields */ \
|
||||
+ (unsigned)4 /* Node size, in bytes */ \
|
||||
+ (unsigned)2 /* Record size, in bytes */ \
|
||||
+ (unsigned)2 /* Depth of tree */ \
|
||||
+ (unsigned)1 /* Split % of full (as integer, ie. "98" means 98%) */ \
|
||||
+ (unsigned)1 /* Merge % of full (as integer, ie. "98" means 98%) */ \
|
||||
+ H5B2_TREE_POINTER_SIZE(h) /* Node pointer to root node in tree */ \
|
||||
)
|
||||
|
||||
/* Size of the v2 B-tree internal node prefix */
|
||||
#define H5B2_INT_PREFIX_SIZE ( \
|
||||
/* General metadata fields */ \
|
||||
H5B2_METADATA_PREFIX_SIZE \
|
||||
\
|
||||
/* Header specific fields */ \
|
||||
/* <none> */ \
|
||||
)
|
||||
|
||||
/* Size of the v2 B-tree leaf node prefix */
|
||||
#define H5B2_LEAF_PREFIX_SIZE ( \
|
||||
/* General metadata fields */ \
|
||||
H5B2_METADATA_PREFIX_SIZE \
|
||||
\
|
||||
/* Header specific fields */ \
|
||||
/* <none> */ \
|
||||
)
|
||||
|
||||
/* Macro to retrieve pointer to i'th native record for native record buffer */
|
||||
#define H5B2_NAT_NREC(b, hdr, idx) ((b) + (hdr)->nat_off[(idx)])
|
||||
|
||||
/* Macro to retrieve pointer to i'th native record for internal node */
|
||||
#define H5B2_INT_NREC(i, hdr, idx) H5B2_NAT_NREC((i)->int_native, (hdr), (idx))
|
||||
|
||||
/* Macro to retrieve pointer to i'th native record for leaf node */
|
||||
#define H5B2_LEAF_NREC(l, hdr, idx) H5B2_NAT_NREC((l)->leaf_native, (hdr), (idx))
|
||||
|
||||
/* Number of records that fit into internal node */
|
||||
/* (accounts for extra node pointer by counting it in with the prefix bytes) */
|
||||
#define H5B2_NUM_INT_REC(h, d) \
|
||||
(((h)->node_size - (H5B2_INT_PREFIX_SIZE + H5B2_INT_POINTER_SIZE(h, d))) / ((h)->rrec_size + H5B2_INT_POINTER_SIZE(h, d)))
|
||||
|
||||
|
||||
/****************************/
|
||||
/* Package Private Typedefs */
|
||||
/****************************/
|
||||
|
||||
/* A "node pointer" to another B-tree node */
|
||||
typedef struct {
|
||||
haddr_t addr; /* Address of other node */
|
||||
uint16_t node_nrec; /* Number of records used in node pointed to */
|
||||
hsize_t all_nrec; /* Number of records in node pointed to and all it's children */
|
||||
} H5B2_node_ptr_t;
|
||||
|
||||
/* Information about a node at a given depth */
|
||||
typedef struct {
|
||||
unsigned max_nrec; /* Max. number of records in node */
|
||||
unsigned split_nrec; /* Number of records to split node at */
|
||||
unsigned merge_nrec; /* Number of records to merge node at */
|
||||
hsize_t cum_max_nrec; /* Cumulative max. # of records below this node's depth */
|
||||
uint8_t cum_max_nrec_size; /* Size to store cumulative max. # of records for this node (in bytes) */
|
||||
H5FL_fac_head_t *nat_rec_fac; /* Factory for native record blocks */
|
||||
H5FL_fac_head_t *node_ptr_fac; /* Factory for node pointer blocks */
|
||||
} H5B2_node_info_t;
|
||||
|
||||
/* The B-tree header information */
|
||||
typedef struct H5B2_hdr_t {
|
||||
/* Information for H5AC cache functions, _must_ be first field in structure */
|
||||
H5AC_info_t cache_info;
|
||||
|
||||
/* Internal B-tree information (stored) */
|
||||
H5B2_node_ptr_t root; /* Node pointer to root node in B-tree */
|
||||
|
||||
/* Information set by user (stored) */
|
||||
uint8_t split_percent; /* Percent full at which to split the node, when inserting */
|
||||
uint8_t merge_percent; /* Percent full at which to merge the node, when deleting */
|
||||
uint32_t node_size; /* Size of B-tree nodes, in bytes */
|
||||
uint32_t rrec_size; /* Size of "raw" (on disk) record, in bytes */
|
||||
|
||||
/* Dynamic information (stored) */
|
||||
uint16_t depth; /* B-tree's overall depth */
|
||||
|
||||
/* Derived information from user's information (not stored) */
|
||||
uint8_t max_nrec_size; /* Size to store max. # of records in any node (in bytes) */
|
||||
|
||||
/* Shared internal data structures (not stored) */
|
||||
H5F_t *f; /* Pointer to the file that the B-tree is in */
|
||||
haddr_t addr; /* Address of B-tree header in the file */
|
||||
size_t hdr_size; /* Size of the B-tree header on disk */
|
||||
size_t rc; /* Reference count of nodes using this header */
|
||||
size_t file_rc; /* Reference count of files using this header */
|
||||
hbool_t pending_delete; /* B-tree is pending deletion */
|
||||
uint8_t sizeof_size; /* Size of file sizes */
|
||||
uint8_t sizeof_addr; /* Size of file addresses */
|
||||
H5B2_remove_t remove_op; /* Callback operator for deleting B-tree */
|
||||
void *remove_op_data;/* B-tree deletion callback's context */
|
||||
uint8_t *page; /* Common disk page for I/O */
|
||||
size_t *nat_off; /* Array of offsets of native records */
|
||||
H5B2_node_info_t *node_info; /* Table of node info structs for current depth of B-tree */
|
||||
uint8_t *min_native_rec; /* Pointer to minimum native record */
|
||||
uint8_t *max_native_rec; /* Pointer to maximum native record */
|
||||
|
||||
/* Client information (not stored) */
|
||||
const H5B2_class_t *cls; /* Class of B-tree client */
|
||||
void *cb_ctx; /* Client callback context */
|
||||
} H5B2_hdr_t;
|
||||
|
||||
/* B-tree leaf node information */
|
||||
typedef struct H5B2_leaf_t {
|
||||
/* Information for H5AC cache functions, _must_ be first field in structure */
|
||||
H5AC_info_t cache_info;
|
||||
|
||||
/* Internal B-tree information */
|
||||
H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
|
||||
uint8_t *leaf_native; /* Pointer to native records */
|
||||
uint16_t nrec; /* Number of records in node */
|
||||
} H5B2_leaf_t;
|
||||
|
||||
/* B-tree internal node information */
|
||||
typedef struct H5B2_internal_t {
|
||||
/* Information for H5AC cache functions, _must_ be first field in structure */
|
||||
H5AC_info_t cache_info;
|
||||
|
||||
/* Internal B-tree information */
|
||||
H5B2_hdr_t *hdr; /* Pointer to the [pinned] v2 B-tree header */
|
||||
uint8_t *int_native; /* Pointer to native records */
|
||||
H5B2_node_ptr_t *node_ptrs; /* Pointer to node pointers */
|
||||
uint16_t nrec; /* Number of records in node */
|
||||
uint16_t depth; /* Depth of this node in the B-tree */
|
||||
} H5B2_internal_t;
|
||||
|
||||
/* v2 B-tree */
|
||||
struct H5B2_t {
|
||||
H5B2_hdr_t *hdr; /* Pointer to internal v2 B-tree header info */
|
||||
H5F_t *f; /* Pointer to file for v2 B-tree */
|
||||
};
|
||||
|
||||
/* Node position, for min/max determination */
|
||||
typedef enum H5B2_nodepos_t {
|
||||
H5B2_POS_ROOT, /* Node is root (i.e. both right & left-most in tree) */
|
||||
H5B2_POS_RIGHT, /* Node is right-most in tree, at a given depth */
|
||||
H5B2_POS_LEFT, /* Node is left-most in tree, at a given depth */
|
||||
H5B2_POS_MIDDLE /* Node is neither right or left-most in tree */
|
||||
} H5B2_nodepos_t;
|
||||
|
||||
/* Callback info for loading a free space header into the cache */
|
||||
typedef struct H5B2_hdr_cache_ud_t {
|
||||
H5F_t *f; /* File that v2 b-tree header is within */
|
||||
void *ctx_udata; /* User-data for protecting */
|
||||
} H5B2_hdr_cache_ud_t;
|
||||
|
||||
/* Callback info for loading a free space internal node into the cache */
|
||||
typedef struct H5B2_internal_cache_ud_t {
|
||||
H5F_t *f; /* File that v2 b-tree header is within */
|
||||
H5B2_hdr_t *hdr; /* v2 B-tree header */
|
||||
unsigned nrec; /* Number of records in node to load */
|
||||
unsigned depth; /* Depth of node to load */
|
||||
} H5B2_internal_cache_ud_t;
|
||||
|
||||
/* Callback info for loading a free space leaf node into the cache */
|
||||
typedef struct H5B2_leaf_cache_ud_t {
|
||||
H5F_t *f; /* File that v2 b-tree header is within */
|
||||
H5B2_hdr_t *hdr; /* v2 B-tree header */
|
||||
unsigned nrec; /* Number of records in node to load */
|
||||
} H5B2_leaf_cache_ud_t;
|
||||
|
||||
#ifdef H5B2_TESTING
|
||||
/* Node information for testing */
|
||||
typedef struct {
|
||||
unsigned depth; /* Depth of node */
|
||||
unsigned nrec; /* Number of records in node */
|
||||
} H5B2_node_info_test_t;
|
||||
#endif /* H5B2_TESTING */
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* Package Private Variables */
|
||||
/*****************************/
|
||||
|
||||
/* H5B2 header inherits cache-like properties from H5AC */
|
||||
H5_DLLVAR const H5AC_class_t H5AC_BT2_HDR[1];
|
||||
|
||||
/* H5B2 internal node inherits cache-like properties from H5AC */
|
||||
H5_DLLVAR const H5AC_class_t H5AC_BT2_INT[1];
|
||||
|
||||
/* H5B2 leaf node inherits cache-like properties from H5AC */
|
||||
H5_DLLVAR const H5AC_class_t H5AC_BT2_LEAF[1];
|
||||
|
||||
/* Declare a free list to manage the H5B2_internal_t struct */
|
||||
H5FL_EXTERN(H5B2_internal_t);
|
||||
|
||||
/* Declare a free list to manage the H5B2_leaf_t struct */
|
||||
H5FL_EXTERN(H5B2_leaf_t);
|
||||
|
||||
/* Internal v2 B-tree testing class */
|
||||
#ifdef H5B2_TESTING
|
||||
H5_DLLVAR const H5B2_class_t H5B2_TEST[1];
|
||||
#endif /* H5B2_TESTING */
|
||||
|
||||
/* Array of v2 B-tree client ID -> client class mappings */
|
||||
extern const H5B2_class_t *const H5B2_client_class_g[H5B2_NUM_BTREE_ID];
|
||||
|
||||
|
||||
/******************************/
|
||||
/* Package Private Prototypes */
|
||||
/******************************/
|
||||
|
||||
/* Routines for managing B-tree header info */
|
||||
H5_DLL H5B2_hdr_t *H5B2_hdr_alloc(H5F_t *f);
|
||||
H5_DLL haddr_t H5B2_hdr_create(H5F_t *f, hid_t dxpl_id,
|
||||
const H5B2_create_t *cparam, void *ctx_udata);
|
||||
H5_DLL herr_t H5B2_hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam,
|
||||
void *ctx_udata, uint16_t depth);
|
||||
H5_DLL herr_t H5B2_hdr_incr(H5B2_hdr_t *hdr);
|
||||
H5_DLL herr_t H5B2_hdr_decr(H5B2_hdr_t *hdr);
|
||||
H5_DLL herr_t H5B2_hdr_fuse_incr(H5B2_hdr_t *hdr);
|
||||
H5_DLL size_t H5B2_hdr_fuse_decr(H5B2_hdr_t *hdr);
|
||||
H5_DLL herr_t H5B2_hdr_dirty(H5B2_hdr_t *hdr);
|
||||
H5_DLL herr_t H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id);
|
||||
|
||||
/* Routines for operating on leaf nodes */
|
||||
H5B2_leaf_t *H5B2_protect_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, haddr_t addr,
|
||||
unsigned nrec, H5AC_protect_t rw);
|
||||
|
||||
/* Routines for operating on internal nodes */
|
||||
H5_DLL H5B2_internal_t *H5B2_protect_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
haddr_t addr, unsigned nrec, unsigned depth, H5AC_protect_t rw);
|
||||
|
||||
/* Routines for allocating nodes */
|
||||
H5_DLL herr_t H5B2_split_root(H5B2_hdr_t *hdr, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5B2_create_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
H5B2_node_ptr_t *node_ptr);
|
||||
|
||||
/* Routines for releasing structures */
|
||||
H5_DLL herr_t H5B2_hdr_free(H5B2_hdr_t *hdr);
|
||||
H5_DLL herr_t H5B2_leaf_free(H5B2_leaf_t *l);
|
||||
H5_DLL herr_t H5B2_internal_free(H5B2_internal_t *i);
|
||||
|
||||
/* Routines for inserting records */
|
||||
H5_DLL herr_t H5B2_insert_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
unsigned depth, unsigned *parent_cache_info_flags_ptr,
|
||||
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *udata);
|
||||
H5_DLL herr_t H5B2_insert_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, void *udata);
|
||||
|
||||
/* Routines for iterating over nodes/records */
|
||||
H5_DLL herr_t H5B2_iterate_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
|
||||
const H5B2_node_ptr_t *curr_node, H5B2_operator_t op, void *op_data);
|
||||
H5_DLL herr_t H5B2_node_size(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
unsigned depth, const H5B2_node_ptr_t *curr_node, hsize_t *op_data);
|
||||
|
||||
/* Routines for locating records */
|
||||
H5_DLL int H5B2_locate_record(const H5B2_class_t *type, unsigned nrec,
|
||||
size_t *rec_off, const uint8_t *native, const void *udata, unsigned *idx, int *result);
|
||||
H5_DLL herr_t H5B2_neighbor_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
unsigned depth, H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc,
|
||||
H5B2_compare_t comp, void *udata, H5B2_found_t op, void *op_data);
|
||||
H5_DLL herr_t H5B2_neighbor_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
H5B2_node_ptr_t *curr_node_ptr, void *neighbor_loc,
|
||||
H5B2_compare_t comp, void *udata, H5B2_found_t op, void *op_data);
|
||||
|
||||
/* Routines for removing records */
|
||||
H5_DLL herr_t H5B2_remove_internal(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
hbool_t *depth_decreased, void *swap_loc, unsigned depth,
|
||||
H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
|
||||
H5B2_nodepos_t curr_pos, H5B2_node_ptr_t *curr_node_ptr, void *udata,
|
||||
H5B2_remove_t op, void *op_data);
|
||||
H5_DLL herr_t H5B2_remove_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
|
||||
void *udata, H5B2_remove_t op, void *op_data);
|
||||
H5_DLL herr_t H5B2_remove_internal_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
hbool_t *depth_decreased, void *swap_loc, unsigned depth,
|
||||
H5AC_info_t *parent_cache_info, unsigned *parent_cache_info_flags_ptr,
|
||||
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos, hsize_t n,
|
||||
H5B2_remove_t op, void *op_data);
|
||||
H5_DLL herr_t H5B2_remove_leaf_by_idx(H5B2_hdr_t *hdr, hid_t dxpl_id,
|
||||
H5B2_node_ptr_t *curr_node_ptr, H5B2_nodepos_t curr_pos,
|
||||
unsigned idx, H5B2_remove_t op, void *op_data);
|
||||
|
||||
/* Routines for deleting nodes */
|
||||
H5_DLL herr_t H5B2_delete_node(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth,
|
||||
const H5B2_node_ptr_t *curr_node, H5B2_remove_t op, void *op_data);
|
||||
|
||||
/* Debugging routines for dumping file structures */
|
||||
H5_DLL herr_t H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
FILE *stream, int indent, int fwidth, const H5B2_class_t *type, haddr_t obj_addr);
|
||||
H5_DLL herr_t H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
FILE *stream, int indent, int fwidth, const H5B2_class_t *type,
|
||||
haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr);
|
||||
H5_DLL herr_t H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
FILE *stream, int indent, int fwidth, const H5B2_class_t *type,
|
||||
haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr);
|
||||
|
||||
/* Testing routines */
|
||||
#ifdef H5B2_TESTING
|
||||
H5_DLL herr_t H5B2_get_root_addr_test(H5B2_t *bt2, haddr_t *root_addr);
|
||||
H5_DLL int H5B2_get_node_depth_test(H5B2_t *bt2, hid_t dxpl_id, void *udata);
|
||||
H5_DLL herr_t H5B2_get_node_info_test(H5B2_t *bt2, hid_t dxpl_id,
|
||||
void *udata, H5B2_node_info_test_t *ninfo);
|
||||
#endif /* H5B2_TESTING */
|
||||
|
||||
#endif /* _H5B2pkg_H */
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Created: H5B2public.h
|
||||
* Jan 31 2005
|
||||
* Quincey Koziol <koziol@ncsa.uiuc.edu>
|
||||
*
|
||||
* Purpose: Public declarations for the v2 B-tree package.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef _H5B2public_H
|
||||
#define _H5B2public_H
|
||||
|
||||
/* Public headers needed by this file */
|
||||
#include "H5public.h"
|
||||
|
||||
/*****************/
|
||||
/* Public Macros */
|
||||
/*****************/
|
||||
|
||||
/*******************/
|
||||
/* Public Typedefs */
|
||||
/*******************/
|
||||
|
||||
/**********************************/
|
||||
/* Public API Function Prototypes */
|
||||
/**********************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _H5B2public_H */
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
|
||||
* Thursday, May 15, 2003
|
||||
*
|
||||
* Purpose: This file contains declarations which are visible only within
|
||||
* the H5B package. Source files outside the H5B package should
|
||||
* include H5Bprivate.h instead.
|
||||
*/
|
||||
#ifndef H5B_PACKAGE
|
||||
#error "Do not include this file outside the H5B package!"
|
||||
#endif
|
||||
|
||||
#ifndef _H5Bpkg_H
|
||||
#define _H5Bpkg_H
|
||||
|
||||
/* Get package's private header */
|
||||
#include "H5Bprivate.h"
|
||||
|
||||
/* Other private headers needed by this file */
|
||||
#include "H5ACprivate.h" /* Metadata cache */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
|
||||
|
||||
/**************************/
|
||||
/* Package Private Macros */
|
||||
/**************************/
|
||||
|
||||
/* Get the native key at a given index */
|
||||
#define H5B_NKEY(b, shared, idx) ((b)->native + (shared)->nkey[(idx)])
|
||||
|
||||
|
||||
/****************************/
|
||||
/* Package Private Typedefs */
|
||||
/****************************/
|
||||
|
||||
/* The B-tree node as stored in memory... */
|
||||
typedef struct H5B_t {
|
||||
H5AC_info_t cache_info; /* Information for H5AC cache functions */
|
||||
/* _must_ be first field in structure */
|
||||
H5RC_t *rc_shared; /*ref-counted shared info */
|
||||
unsigned level; /*node level */
|
||||
unsigned nchildren; /*number of child pointers */
|
||||
haddr_t left; /*address of left sibling */
|
||||
haddr_t right; /*address of right sibling */
|
||||
uint8_t *native; /*array of keys in native format */
|
||||
haddr_t *child; /*2k child pointers */
|
||||
} H5B_t;
|
||||
|
||||
/* Callback info for loading a B-tree node into the cache */
|
||||
typedef struct H5B_cache_ud_t {
|
||||
H5F_t *f; /* File that B-tree node is within */
|
||||
const struct H5B_class_t *type; /* Type of tree */
|
||||
H5RC_t *rc_shared; /* Ref-counted shared info */
|
||||
} H5B_cache_ud_t;
|
||||
|
||||
/*****************************/
|
||||
/* Package Private Variables */
|
||||
/*****************************/
|
||||
|
||||
/* H5B header inherits cache-like properties from H5AC */
|
||||
H5_DLLVAR const H5AC_class_t H5AC_BT[1];
|
||||
|
||||
/* Declare a free list to manage the haddr_t sequence information */
|
||||
H5FL_SEQ_EXTERN(haddr_t);
|
||||
|
||||
/* Declare a PQ free list to manage the native block information */
|
||||
H5FL_BLK_EXTERN(native_block);
|
||||
|
||||
/* Declare a free list to manage the H5B_t struct */
|
||||
H5FL_EXTERN(H5B_t);
|
||||
|
||||
|
||||
/******************************/
|
||||
/* Package Private Prototypes */
|
||||
/******************************/
|
||||
H5_DLL herr_t H5B_node_dest(H5B_t *bt);
|
||||
#ifdef H5B_DEBUG
|
||||
herr_t H5B_assert(H5F_t *f, hid_t dxpl_id, haddr_t addr, const H5B_class_t *type,
|
||||
void *udata);
|
||||
#endif
|
||||
|
||||
#endif /*_H5Bpkg_H*/
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Created: H5Bproto.h
|
||||
* Jul 10 1997
|
||||
* Robb Matzke <matzke@llnl.gov>
|
||||
*
|
||||
* Purpose: Public declarations for the H5B package.
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef _H5Bpublic_H
|
||||
#define _H5Bpublic_H
|
||||
|
||||
/* Public headers needed by this file */
|
||||
#include "H5public.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,61 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Created: H5Cpublic.h
|
||||
* June 4, 2005
|
||||
* John Mainzer
|
||||
*
|
||||
* Purpose: Public include file for cache functions.
|
||||
*
|
||||
* Modifications:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef _H5Cpublic_H
|
||||
#define _H5Cpublic_H
|
||||
|
||||
/* Public headers needed by this file */
|
||||
#include "H5public.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum H5C_cache_incr_mode
|
||||
{
|
||||
H5C_incr__off,
|
||||
H5C_incr__threshold
|
||||
};
|
||||
|
||||
enum H5C_cache_flash_incr_mode
|
||||
{
|
||||
H5C_flash_incr__off,
|
||||
H5C_flash_incr__add_space
|
||||
};
|
||||
|
||||
enum H5C_cache_decr_mode
|
||||
{
|
||||
H5C_decr__off,
|
||||
H5C_decr__threshold,
|
||||
H5C_decr__age_out,
|
||||
H5C_decr__age_out_with_threshold
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,173 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/*
|
||||
* This file contains public declarations for the H5D module.
|
||||
*/
|
||||
#ifndef _H5Dpublic_H
|
||||
#define _H5Dpublic_H
|
||||
|
||||
/* System headers needed by this file */
|
||||
|
||||
/* Public headers needed by this file */
|
||||
#include "H5public.h"
|
||||
#include "H5Ipublic.h"
|
||||
|
||||
/*****************/
|
||||
/* Public Macros */
|
||||
/*****************/
|
||||
|
||||
/* Macros used to "unset" chunk cache configuration parameters */
|
||||
#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT ((size_t) -1)
|
||||
#define H5D_CHUNK_CACHE_NBYTES_DEFAULT ((size_t) -1)
|
||||
#define H5D_CHUNK_CACHE_W0_DEFAULT (-1.0f)
|
||||
|
||||
/* Property names for H5LTDdirect_chunk_write */
|
||||
#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME "direct_chunk_flag"
|
||||
#define H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME "direct_chunk_filters"
|
||||
#define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME "direct_chunk_offset"
|
||||
#define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME "direct_chunk_datasize"
|
||||
|
||||
/*******************/
|
||||
/* Public Typedefs */
|
||||
/*******************/
|
||||
|
||||
/* Values for the H5D_LAYOUT property */
|
||||
typedef enum H5D_layout_t {
|
||||
H5D_LAYOUT_ERROR = -1,
|
||||
|
||||
H5D_COMPACT = 0, /*raw data is very small */
|
||||
H5D_CONTIGUOUS = 1, /*the default */
|
||||
H5D_CHUNKED = 2, /*slow and fancy */
|
||||
H5D_NLAYOUTS = 3 /*this one must be last! */
|
||||
} H5D_layout_t;
|
||||
|
||||
/* Types of chunk index data structures */
|
||||
typedef enum H5D_chunk_index_t {
|
||||
H5D_CHUNK_BTREE = 0 /* v1 B-tree index */
|
||||
} H5D_chunk_index_t;
|
||||
|
||||
/* Values for the space allocation time property */
|
||||
typedef enum H5D_alloc_time_t {
|
||||
H5D_ALLOC_TIME_ERROR = -1,
|
||||
H5D_ALLOC_TIME_DEFAULT = 0,
|
||||
H5D_ALLOC_TIME_EARLY = 1,
|
||||
H5D_ALLOC_TIME_LATE = 2,
|
||||
H5D_ALLOC_TIME_INCR = 3
|
||||
} H5D_alloc_time_t;
|
||||
|
||||
/* Values for the status of space allocation */
|
||||
typedef enum H5D_space_status_t {
|
||||
H5D_SPACE_STATUS_ERROR = -1,
|
||||
H5D_SPACE_STATUS_NOT_ALLOCATED = 0,
|
||||
H5D_SPACE_STATUS_PART_ALLOCATED = 1,
|
||||
H5D_SPACE_STATUS_ALLOCATED = 2
|
||||
} H5D_space_status_t;
|
||||
|
||||
/* Values for time of writing fill value property */
|
||||
typedef enum H5D_fill_time_t {
|
||||
H5D_FILL_TIME_ERROR = -1,
|
||||
H5D_FILL_TIME_ALLOC = 0,
|
||||
H5D_FILL_TIME_NEVER = 1,
|
||||
H5D_FILL_TIME_IFSET = 2
|
||||
} H5D_fill_time_t;
|
||||
|
||||
/* Values for fill value status */
|
||||
typedef enum H5D_fill_value_t {
|
||||
H5D_FILL_VALUE_ERROR =-1,
|
||||
H5D_FILL_VALUE_UNDEFINED =0,
|
||||
H5D_FILL_VALUE_DEFAULT =1,
|
||||
H5D_FILL_VALUE_USER_DEFINED =2
|
||||
} H5D_fill_value_t;
|
||||
|
||||
/********************/
|
||||
/* Public Variables */
|
||||
/********************/
|
||||
|
||||
/*********************/
|
||||
/* Public Prototypes */
|
||||
/*********************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define the operator function pointer for H5Diterate() */
|
||||
typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim,
|
||||
const hsize_t *point, void *operator_data);
|
||||
|
||||
/* Define the operator function pointer for H5Dscatter() */
|
||||
typedef herr_t (*H5D_scatter_func_t)(const void **src_buf/*out*/,
|
||||
size_t *src_buf_bytes_used/*out*/,
|
||||
void *op_data);
|
||||
|
||||
/* Define the operator function pointer for H5Dgather() */
|
||||
typedef herr_t (*H5D_gather_func_t)(const void *dst_buf,
|
||||
size_t dst_buf_bytes_used, void *op_data);
|
||||
|
||||
H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id,
|
||||
hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id);
|
||||
H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id,
|
||||
hid_t plist_id, hid_t dapl_id);
|
||||
H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id);
|
||||
H5_DLL herr_t H5Dclose(hid_t dset_id);
|
||||
H5_DLL hid_t H5Dget_space(hid_t dset_id);
|
||||
H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation);
|
||||
H5_DLL hid_t H5Dget_type(hid_t dset_id);
|
||||
H5_DLL hid_t H5Dget_create_plist(hid_t dset_id);
|
||||
H5_DLL hid_t H5Dget_access_plist(hid_t dset_id);
|
||||
H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id);
|
||||
H5_DLL haddr_t H5Dget_offset(hid_t dset_id);
|
||||
H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
|
||||
hid_t file_space_id, hid_t plist_id, void *buf/*out*/);
|
||||
H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
|
||||
hid_t file_space_id, hid_t plist_id, const void *buf);
|
||||
H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id,
|
||||
H5D_operator_t op, void *operator_data);
|
||||
H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
|
||||
H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size);
|
||||
H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf,
|
||||
hid_t buf_type, hid_t space);
|
||||
H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]);
|
||||
H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id,
|
||||
hid_t dst_space_id, void *dst_buf);
|
||||
H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id,
|
||||
size_t dst_buf_size, void *dst_buf, H5D_gather_func_t op, void *op_data);
|
||||
H5_DLL herr_t H5Ddebug(hid_t dset_id);
|
||||
|
||||
/* Symbols defined for compatibility with previous versions of the HDF5 API.
|
||||
*
|
||||
* Use of these symbols is deprecated.
|
||||
*/
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
|
||||
/* Macros */
|
||||
|
||||
|
||||
/* Typedefs */
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
H5_DLL hid_t H5Dcreate1(hid_t file_id, const char *name, hid_t type_id,
|
||||
hid_t space_id, hid_t dcpl_id);
|
||||
H5_DLL hid_t H5Dopen1(hid_t file_id, const char *name);
|
||||
H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t size[]);
|
||||
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _H5Dpublic_H */
|
||||
|
||||
@@ -1,216 +0,0 @@
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
||||
* terms governing use, modification, and redistribution, is contained in *
|
||||
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
||||
* of the source code distribution tree; Copyright.html can be found at the *
|
||||
* root level of an installed copy of the electronic HDF5 document set and *
|
||||
* is linked from the top-level documents page. It can also be found at *
|
||||
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
||||
* access to either file, you may request a copy from help@hdfgroup.org. *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
/* Generated automatically by bin/make_err -- do not edit */
|
||||
/* Add new errors to H5err.txt file */
|
||||
|
||||
|
||||
#ifndef _H5Edefin_H
|
||||
#define _H5Edefin_H
|
||||
|
||||
/* Major error IDs */
|
||||
hid_t H5E_DATASET_g = FAIL; /* Dataset */
|
||||
hid_t H5E_FUNC_g = FAIL; /* Function entry/exit */
|
||||
hid_t H5E_STORAGE_g = FAIL; /* Data storage */
|
||||
hid_t H5E_FILE_g = FAIL; /* File accessibilty */
|
||||
hid_t H5E_SOHM_g = FAIL; /* Shared Object Header Messages */
|
||||
hid_t H5E_SYM_g = FAIL; /* Symbol table */
|
||||
hid_t H5E_PLUGIN_g = FAIL; /* Plugin for dynamically loaded library */
|
||||
hid_t H5E_VFL_g = FAIL; /* Virtual File Layer */
|
||||
hid_t H5E_INTERNAL_g = FAIL; /* Internal error (too specific to document in detail) */
|
||||
hid_t H5E_BTREE_g = FAIL; /* B-Tree node */
|
||||
hid_t H5E_REFERENCE_g = FAIL; /* References */
|
||||
hid_t H5E_DATASPACE_g = FAIL; /* Dataspace */
|
||||
hid_t H5E_RESOURCE_g = FAIL; /* Resource unavailable */
|
||||
hid_t H5E_PLIST_g = FAIL; /* Property lists */
|
||||
hid_t H5E_LINK_g = FAIL; /* Links */
|
||||
hid_t H5E_DATATYPE_g = FAIL; /* Datatype */
|
||||
hid_t H5E_RS_g = FAIL; /* Reference Counted Strings */
|
||||
hid_t H5E_HEAP_g = FAIL; /* Heap */
|
||||
hid_t H5E_OHDR_g = FAIL; /* Object header */
|
||||
hid_t H5E_ATOM_g = FAIL; /* Object atom */
|
||||
hid_t H5E_ATTR_g = FAIL; /* Attribute */
|
||||
hid_t H5E_NONE_MAJOR_g = FAIL; /* No error */
|
||||
hid_t H5E_IO_g = FAIL; /* Low-level I/O */
|
||||
hid_t H5E_SLIST_g = FAIL; /* Skip Lists */
|
||||
hid_t H5E_EFL_g = FAIL; /* External file list */
|
||||
hid_t H5E_TST_g = FAIL; /* Ternary Search Trees */
|
||||
hid_t H5E_ARGS_g = FAIL; /* Invalid arguments to routine */
|
||||
hid_t H5E_ERROR_g = FAIL; /* Error API */
|
||||
hid_t H5E_PLINE_g = FAIL; /* Data filters */
|
||||
hid_t H5E_FSPACE_g = FAIL; /* Free Space Manager */
|
||||
hid_t H5E_CACHE_g = FAIL; /* Object cache */
|
||||
|
||||
/* Minor error IDs */
|
||||
|
||||
/* Generic low-level file I/O errors */
|
||||
hid_t H5E_SEEKERROR_g = FAIL; /* Seek failed */
|
||||
hid_t H5E_READERROR_g = FAIL; /* Read failed */
|
||||
hid_t H5E_WRITEERROR_g = FAIL; /* Write failed */
|
||||
hid_t H5E_CLOSEERROR_g = FAIL; /* Close failed */
|
||||
hid_t H5E_OVERFLOW_g = FAIL; /* Address overflowed */
|
||||
hid_t H5E_FCNTL_g = FAIL; /* File control (fcntl) failed */
|
||||
|
||||
/* Resource errors */
|
||||
hid_t H5E_NOSPACE_g = FAIL; /* No space available for allocation */
|
||||
hid_t H5E_CANTALLOC_g = FAIL; /* Can't allocate space */
|
||||
hid_t H5E_CANTCOPY_g = FAIL; /* Unable to copy object */
|
||||
hid_t H5E_CANTFREE_g = FAIL; /* Unable to free object */
|
||||
hid_t H5E_ALREADYEXISTS_g = FAIL; /* Object already exists */
|
||||
hid_t H5E_CANTLOCK_g = FAIL; /* Unable to lock object */
|
||||
hid_t H5E_CANTUNLOCK_g = FAIL; /* Unable to unlock object */
|
||||
hid_t H5E_CANTGC_g = FAIL; /* Unable to garbage collect */
|
||||
hid_t H5E_CANTGETSIZE_g = FAIL; /* Unable to compute size */
|
||||
hid_t H5E_OBJOPEN_g = FAIL; /* Object is already open */
|
||||
|
||||
/* Heap errors */
|
||||
hid_t H5E_CANTRESTORE_g = FAIL; /* Can't restore condition */
|
||||
hid_t H5E_CANTCOMPUTE_g = FAIL; /* Can't compute value */
|
||||
hid_t H5E_CANTEXTEND_g = FAIL; /* Can't extend heap's space */
|
||||
hid_t H5E_CANTATTACH_g = FAIL; /* Can't attach object */
|
||||
hid_t H5E_CANTUPDATE_g = FAIL; /* Can't update object */
|
||||
hid_t H5E_CANTOPERATE_g = FAIL; /* Can't operate on object */
|
||||
|
||||
/* Function entry/exit interface errors */
|
||||
hid_t H5E_CANTINIT_g = FAIL; /* Unable to initialize object */
|
||||
hid_t H5E_ALREADYINIT_g = FAIL; /* Object already initialized */
|
||||
hid_t H5E_CANTRELEASE_g = FAIL; /* Unable to release object */
|
||||
|
||||
/* Property list errors */
|
||||
hid_t H5E_CANTGET_g = FAIL; /* Can't get value */
|
||||
hid_t H5E_CANTSET_g = FAIL; /* Can't set value */
|
||||
hid_t H5E_DUPCLASS_g = FAIL; /* Duplicate class name in parent class */
|
||||
hid_t H5E_SETDISALLOWED_g = FAIL; /* Disallowed operation */
|
||||
|
||||
/* Free space errors */
|
||||
hid_t H5E_CANTMERGE_g = FAIL; /* Can't merge objects */
|
||||
hid_t H5E_CANTREVIVE_g = FAIL; /* Can't revive object */
|
||||
hid_t H5E_CANTSHRINK_g = FAIL; /* Can't shrink container */
|
||||
|
||||
/* Object header related errors */
|
||||
hid_t H5E_LINKCOUNT_g = FAIL; /* Bad object header link count */
|
||||
hid_t H5E_VERSION_g = FAIL; /* Wrong version number */
|
||||
hid_t H5E_ALIGNMENT_g = FAIL; /* Alignment error */
|
||||
hid_t H5E_BADMESG_g = FAIL; /* Unrecognized message */
|
||||
hid_t H5E_CANTDELETE_g = FAIL; /* Can't delete message */
|
||||
hid_t H5E_BADITER_g = FAIL; /* Iteration failed */
|
||||
hid_t H5E_CANTPACK_g = FAIL; /* Can't pack messages */
|
||||
hid_t H5E_CANTRESET_g = FAIL; /* Can't reset object */
|
||||
hid_t H5E_CANTRENAME_g = FAIL; /* Unable to rename object */
|
||||
|
||||
/* System level errors */
|
||||
hid_t H5E_SYSERRSTR_g = FAIL; /* System error message */
|
||||
|
||||
/* I/O pipeline errors */
|
||||
hid_t H5E_NOFILTER_g = FAIL; /* Requested filter is not available */
|
||||
hid_t H5E_CALLBACK_g = FAIL; /* Callback failed */
|
||||
hid_t H5E_CANAPPLY_g = FAIL; /* Error from filter 'can apply' callback */
|
||||
hid_t H5E_SETLOCAL_g = FAIL; /* Error from filter 'set local' callback */
|
||||
hid_t H5E_NOENCODER_g = FAIL; /* Filter present but encoding disabled */
|
||||
hid_t H5E_CANTFILTER_g = FAIL; /* Filter operation failed */
|
||||
|
||||
/* Group related errors */
|
||||
hid_t H5E_CANTOPENOBJ_g = FAIL; /* Can't open object */
|
||||
hid_t H5E_CANTCLOSEOBJ_g = FAIL; /* Can't close object */
|
||||
hid_t H5E_COMPLEN_g = FAIL; /* Name component is too long */
|
||||
hid_t H5E_PATH_g = FAIL; /* Problem with path to object */
|
||||
|
||||
/* No error */
|
||||
hid_t H5E_NONE_MINOR_g = FAIL; /* No error */
|
||||
|
||||
/* Plugin errors */
|
||||
hid_t H5E_OPENERROR_g = FAIL; /* Can't open directory or file */
|
||||
|
||||
/* File accessibilty errors */
|
||||
hid_t H5E_FILEEXISTS_g = FAIL; /* File already exists */
|
||||
hid_t H5E_FILEOPEN_g = FAIL; /* File already open */
|
||||
hid_t H5E_CANTCREATE_g = FAIL; /* Unable to create file */
|
||||
hid_t H5E_CANTOPENFILE_g = FAIL; /* Unable to open file */
|
||||
hid_t H5E_CANTCLOSEFILE_g = FAIL; /* Unable to close file */
|
||||
hid_t H5E_NOTHDF5_g = FAIL; /* Not an HDF5 file */
|
||||
hid_t H5E_BADFILE_g = FAIL; /* Bad file ID accessed */
|
||||
hid_t H5E_TRUNCATED_g = FAIL; /* File has been truncated */
|
||||
hid_t H5E_MOUNT_g = FAIL; /* File mount error */
|
||||
|
||||
/* Object atom related errors */
|
||||
hid_t H5E_BADATOM_g = FAIL; /* Unable to find atom information (already closed?) */
|
||||
hid_t H5E_BADGROUP_g = FAIL; /* Unable to find ID group information */
|
||||
hid_t H5E_CANTREGISTER_g = FAIL; /* Unable to register new atom */
|
||||
hid_t H5E_CANTINC_g = FAIL; /* Unable to increment reference count */
|
||||
hid_t H5E_CANTDEC_g = FAIL; /* Unable to decrement reference count */
|
||||
hid_t H5E_NOIDS_g = FAIL; /* Out of IDs for group */
|
||||
|
||||
/* Cache related errors */
|
||||
hid_t H5E_CANTFLUSH_g = FAIL; /* Unable to flush data from cache */
|
||||
hid_t H5E_CANTSERIALIZE_g = FAIL; /* Unable to serialize data from cache */
|
||||
hid_t H5E_CANTLOAD_g = FAIL; /* Unable to load metadata into cache */
|
||||
hid_t H5E_PROTECT_g = FAIL; /* Protected metadata error */
|
||||
hid_t H5E_NOTCACHED_g = FAIL; /* Metadata not currently cached */
|
||||
hid_t H5E_SYSTEM_g = FAIL; /* Internal error detected */
|
||||
hid_t H5E_CANTINS_g = FAIL; /* Unable to insert metadata into cache */
|
||||
hid_t H5E_CANTPROTECT_g = FAIL; /* Unable to protect metadata */
|
||||
hid_t H5E_CANTUNPROTECT_g = FAIL; /* Unable to unprotect metadata */
|
||||
hid_t H5E_CANTPIN_g = FAIL; /* Unable to pin cache entry */
|
||||
hid_t H5E_CANTUNPIN_g = FAIL; /* Unable to un-pin cache entry */
|
||||
hid_t H5E_CANTMARKDIRTY_g = FAIL; /* Unable to mark a pinned entry as dirty */
|
||||
hid_t H5E_CANTDIRTY_g = FAIL; /* Unable to mark metadata as dirty */
|
||||
hid_t H5E_CANTEXPUNGE_g = FAIL; /* Unable to expunge a metadata cache entry */
|
||||
hid_t H5E_CANTRESIZE_g = FAIL; /* Unable to resize a metadata cache entry */
|
||||
|
||||
/* Link related errors */
|
||||
hid_t H5E_TRAVERSE_g = FAIL; /* Link traversal failure */
|
||||
hid_t H5E_NLINKS_g = FAIL; /* Too many soft links in path */
|
||||
hid_t H5E_NOTREGISTERED_g = FAIL; /* Link class not registered */
|
||||
hid_t H5E_CANTMOVE_g = FAIL; /* Can't move object */
|
||||
hid_t H5E_CANTSORT_g = FAIL; /* Can't sort objects */
|
||||
|
||||
/* Parallel MPI errors */
|
||||
hid_t H5E_MPI_g = FAIL; /* Some MPI function failed */
|
||||
hid_t H5E_MPIERRSTR_g = FAIL; /* MPI Error String */
|
||||
hid_t H5E_CANTRECV_g = FAIL; /* Can't receive data */
|
||||
|
||||
/* Dataspace errors */
|
||||
hid_t H5E_CANTCLIP_g = FAIL; /* Can't clip hyperslab region */
|
||||
hid_t H5E_CANTCOUNT_g = FAIL; /* Can't count elements */
|
||||
hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */
|
||||
hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */
|
||||
hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */
|
||||
hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */
|
||||
|
||||
/* Argument errors */
|
||||
hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */
|
||||
hid_t H5E_UNSUPPORTED_g = FAIL; /* Feature is unsupported */
|
||||
hid_t H5E_BADTYPE_g = FAIL; /* Inappropriate type */
|
||||
hid_t H5E_BADRANGE_g = FAIL; /* Out of range */
|
||||
hid_t H5E_BADVALUE_g = FAIL; /* Bad value */
|
||||
|
||||
/* B-tree related errors */
|
||||
hid_t H5E_NOTFOUND_g = FAIL; /* Object not found */
|
||||
hid_t H5E_EXISTS_g = FAIL; /* Object already exists */
|
||||
hid_t H5E_CANTENCODE_g = FAIL; /* Unable to encode value */
|
||||
hid_t H5E_CANTDECODE_g = FAIL; /* Unable to decode value */
|
||||
hid_t H5E_CANTSPLIT_g = FAIL; /* Unable to split node */
|
||||
hid_t H5E_CANTREDISTRIBUTE_g = FAIL; /* Unable to redistribute records */
|
||||
hid_t H5E_CANTSWAP_g = FAIL; /* Unable to swap records */
|
||||
hid_t H5E_CANTINSERT_g = FAIL; /* Unable to insert object */
|
||||
hid_t H5E_CANTLIST_g = FAIL; /* Unable to list node */
|
||||
hid_t H5E_CANTMODIFY_g = FAIL; /* Unable to modify record */
|
||||
hid_t H5E_CANTREMOVE_g = FAIL; /* Unable to remove object */
|
||||
|
||||
/* Datatype conversion errors */
|
||||
hid_t H5E_CANTCONVERT_g = FAIL; /* Can't convert datatypes */
|
||||
hid_t H5E_BADSIZE_g = FAIL; /* Bad size for object */
|
||||
|
||||
#endif /* H5Edefin_H */
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user