本文整理汇总了C++中FloatImage::devMem方法的典型用法代码示例。如果您正苦于以下问题:C++ FloatImage::devMem方法的具体用法?C++ FloatImage::devMem怎么用?C++ FloatImage::devMem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FloatImage
的用法示例。
在下文中一共展示了FloatImage::devMem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update
bool SemiglobalLabMatcher::update()
{
WriteGuard<ReadWritePipe<FloatImage, FloatImage> > wguard(m_wpipe);
FloatImage leftImg, rightImg;
if ( m_lrpipe->read(&leftImg) && m_rrpipe->read(&rightImg) )
{
Dim dsiDim(leftImg.dim().width(), leftImg.dim().height(),
m_maxDisparity);
float *leftImg_d = leftImg.devMem();
float *rightImg_d = rightImg.devMem();
FloatImage dispImage = FloatImage::CreateDev(
Dim(dsiDim.width(), dsiDim.height()));
cudaPitchedPtr aggregDSI = m_aggregDSI.mem(dsiDim);
SGPath *paths = m_sgPaths.getDescDev(dispImage.dim());
SemiGlobalLabDevRun(dsiDim, paths, m_sgPaths.pathCount(),
leftImg_d, rightImg_d,
aggregDSI, dispImage.devMem(), m_zeroAggregDSI);
m_zeroAggregDSI = false;
dispImage.cpuMem();
wguard.write(dispImage);
}
return wguard.wasWrite();
}
示例2: update
bool FastWTAMatcher::update()
{
WriteGuard<ReadWritePipe<FloatImage, FloatImage> > wguard(m_wpipe);
FloatImage leftImg, rightImg;
if ( m_lrpipe->read(&leftImg) && m_rrpipe->read(&rightImg) )
{
float *leftImg_d = leftImg.devMem();
float *rightImg_d = rightImg.devMem();
Dim dsiDim(leftImg.dim().width(), leftImg.dim().height(),
m_maxDisparity);
FloatImage image = FloatImage::CreateDev(
Dim(dsiDim.width(), dsiDim.height()));
FastWTADevRun(dsiDim, leftImg_d, rightImg_d, image.devMem());
image.cpuMem();
wguard.write(image);
}
return wguard.wasWrite();
}