本文整理汇总了C++中Metadata::delta方法的典型用法代码示例。如果您正苦于以下问题:C++ Metadata::delta方法的具体用法?C++ Metadata::delta怎么用?C++ Metadata::delta使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Metadata
的用法示例。
在下文中一共展示了Metadata::delta方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: celledSchema
CelledBaseChunkReader::CelledBaseChunkReader(
const Metadata& m,
PointPool& pool,
const arbiter::Endpoint& endpoint)
: BaseChunkReader(m, pool)
{
DimList dims;
dims.push_back(DimInfo("TubeId", "unsigned", 8));
dims.insert(dims.end(), m.schema().dims().begin(), m.schema().dims().end());
const Schema celledSchema(dims);
PointPool celledPool(celledSchema, m.delta());
auto tubedCells(m.storage().deserialize(endpoint, celledPool, m_id));
Data::PooledStack tubedData(celledPool.dataPool());
auto dataNodes(m_pool.dataPool().acquire(tubedCells.size()));
m_cells = m_pool.cellPool().acquire(tubedCells.size());
const std::size_t celledPointSize(celledSchema.pointSize());
const std::size_t tubeIdSize(sizeof(uint64_t));
uint64_t tube(0);
char* tPos(reinterpret_cast<char*>(&tube));
BinaryPointTable table(m.schema());
pdal::PointRef pointRef(table, 0);
for (auto& cell : m_cells)
{
auto tubedCell(tubedCells.popOne());
const char* src(tubedCell->uniqueData());
Data::PooledNode data(dataNodes.popOne());
std::copy(src, src + tubeIdSize, tPos);
std::copy(src + tubeIdSize, src + celledPointSize, *data);
table.setPoint(*data);
cell.set(pointRef, std::move(data));
m_points.at(tube).emplace_back(cell.point(), cell.uniqueData());
tubedData.push(tubedCell->acquire());
}
}