当前位置: 首页>>代码示例>>C++>>正文


C++ TRACE_FUNCTION函数代码示例

本文整理汇总了C++中TRACE_FUNCTION函数的典型用法代码示例。如果您正苦于以下问题:C++ TRACE_FUNCTION函数的具体用法?C++ TRACE_FUNCTION怎么用?C++ TRACE_FUNCTION使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TRACE_FUNCTION函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _numTextures

GlfTextureRegistry::_TextureMetadata::_TextureMetadata(
    const TfToken *textures, const std::uint32_t numTextures)
    : _numTextures(numTextures)
    , _fileSize(0)
    , _mtime(0)
{
    TRACE_FUNCTION();

    for (std::uint32_t i = 0; i < numTextures; ++i) {
        const TfToken& tex = textures[i];
        double time;
        if (!ArchGetModificationTime(tex.GetText(), &time)) {
            continue;
        }
        int64_t size = ArchGetFileLength(tex.GetText());
        if (size == -1) {
            continue;
        }

        // The file size is not a particularly good indicator that the texture
        // has changed (i.e. uncompressed images with the same dimensions,
        // depth, etc are very likely to have the same size even if they are
        // different.)
        //
        // We aggregate the size of every file in the texture array, but use
        // the most recent mtime of any file so that we reload the array if any
        // file is modified.
        _fileSize += size;
        _mtime = std::max(_mtime, time);
    }
}
开发者ID:PixarAnimationStudios,项目名称:USD,代码行数:31,代码来源:textureRegistry.cpp

示例2: TRACE_FUNCTION

SdfAttributeSpecHandle
SdfAttributeSpec::New(
    const SdfPrimSpecHandle& owner,
    const std::string& name,
    const SdfValueTypeName& typeName,
    SdfVariability variability,
    bool custom)
{
    TRACE_FUNCTION();

    if (not owner) {
	TF_CODING_ERROR("Cannot create an SdfAttributeSpec with a null owner");
	return TfNullPtr;
    }

    if (not Sdf_ChildrenUtils<Sdf_AttributeChildPolicy>::IsValidName(name)) {
        TF_CODING_ERROR(
            "Cannot create attribute on %s with invalid name: %s",
            owner->GetPath().GetText(), name.c_str());
        return TfNullPtr;
    }

    SdfPath attributePath = owner->GetPath().AppendProperty(TfToken(name));
    if (not attributePath.IsPropertyPath()) {
        TF_CODING_ERROR(
            "Cannot create attribute at invalid path <%s.%s>",
            owner->GetPath().GetText(), name.c_str());
        return TfNullPtr;
    }

    return _New(owner, attributePath, typeName, variability, custom);
}
开发者ID:400dama,项目名称:USD,代码行数:32,代码来源:attributeSpec.cpp

示例3: TRACE_FUNCTION

nsresult sbRequestThreadQueue::PushRequest(sbRequestItem * aRequestItem)
{
  TRACE_FUNCTION("RequestType=%ui", aRequestItem->mType);
  NS_ENSURE_ARG_POINTER(aRequestItem);

  NS_ENSURE_STATE(mLock);

  nsresult rv;

  { /* scope for request lock */
    nsAutoLock lock(mLock);

    nsAutoMonitor monitor(mStopWaitMonitor);
    // If we're aborting or shutting down don't accept any more requests
    if (mAbortRequests || mStopProcessing)
    {
      return NS_ERROR_ABORT;
    }

    rv = PushRequestInternal(aRequestItem);
    NS_ENSURE_SUCCESS(rv, rv);
  }

  NS_ASSERTION(mBatchDepth >= 0,
               "Batch depth out of whack in sbBaseDevice::PushRequest");
  // Only process requests if we're not in a batch
  if (mBatchDepth == 0) {
    rv = ProcessRequest();
    NS_ENSURE_SUCCESS(rv, rv);
  }
  return NS_OK;
}
开发者ID:Brijen,项目名称:nightingale-hacking,代码行数:32,代码来源:sbRequestThreadQueue.cpp

示例4: TRACE_FUNCTION

UsdGeomPrimvar
UsdGeomPrimvarsAPI::FindPrimvarWithInheritance(const TfToken &name,
                                               const std::vector<UsdGeomPrimvar>
                                               &inheritedFromAncestors) const
{
    TRACE_FUNCTION();

    const UsdPrim &prim = GetPrim();
    if (!prim) {
        TF_CODING_ERROR("FindPrimvarWithInheritance called on invalid prim: %s", 
                        UsdDescribe(prim).c_str());
        return UsdGeomPrimvar();
    }
    const TfToken attrName = UsdGeomPrimvar::_MakeNamespaced(name);
    UsdGeomPrimvar  pv = GetPrimvar(attrName);
    if (pv.HasAuthoredValue()){
        return pv;
    }
    
    for (UsdGeomPrimvar const &inherited : inheritedFromAncestors) {
        if (inherited.GetName() == attrName){
            return inherited;
        }
    }

    return pv;
}
开发者ID:PixarAnimationStudios,项目名称:USD,代码行数:27,代码来源:primvarsAPI.cpp

示例5: TRACE_FUNCTION

//解析图标
STDMETHODIMP CExtractIcon::Extract( LPCTSTR pstrName, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT /*nIconSize*/ )
{
    TRACE_FUNCTION();
    LOG(_T("%s GetIcon %s %d"), __TFUNCTION__, pstrName, nIconIndex );
    ATLASSERT(phiconLarge);
    ATLASSERT(phiconSmall);
    
    //HMODULE hLib = LoadLibrary( pstrName );
    //if ( hLib )
    //{
    //    *phiconSmall = LoadIcon( (HINSTANCE)hLib, MAKEINTRESOURCE(nIconIndex) );
    //    *phiconLarge = LoadIcon( (HINSTANCE)hLib, MAKEINTRESOURCE(nIconIndex) );
    //    FreeLibrary( hLib );
    //    return S_OK;
    //}
    SHFILEINFO   sfi = { 0 };
    HIMAGELIST hImgList = (HIMAGELIST)SHGetFileInfo( m_szPath, 0,\
        &sfi, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_ICON );
    if ( hImgList )
    {
        LOG( _T("%s Geting Smallone"), __TFUNCTION__ );
        *phiconSmall = ImageList_ExtractIcon(NULL, hImgList, nIconIndex);
    }
    hImgList = (HIMAGELIST)SHGetFileInfo( m_szPath, 0, &sfi, \
        sizeof(SHFILEINFO), SHGFI_SYSICONINDEX|SHGFI_LARGEICON|SHGFI_ICON );
    if ( hImgList )
    {
        LOG( _T("%s Geting Bigone"), __TFUNCTION__ );
        *phiconLarge = ImageList_ExtractIcon(NULL, hImgList, nIconIndex);
    }
    TRACE_RETURN S_OK;
}
开发者ID:winwingy,项目名称:Study,代码行数:33,代码来源:ExtractIcon.cpp

示例6: TRACE_FUNCTION

UsdSkelAnimQuery
UsdSkel_CacheImpl::ReadScope::FindOrCreateAnimQuery(const UsdPrim& prim)
{
    TRACE_FUNCTION();

    if(ARCH_UNLIKELY(!prim || !prim.IsActive()))
        return UsdSkelAnimQuery();

    if(prim.IsInstanceProxy())
        return FindOrCreateAnimQuery(prim.GetPrimInMaster());

    {
        _PrimToAnimMap::const_accessor a;
        if(_cache->_animQueryCache.find(a, prim))
            return UsdSkelAnimQuery(a->second);
    }

    if (UsdSkelIsSkelAnimationPrim(prim)) {
        _PrimToAnimMap::accessor a;
        if(_cache->_animQueryCache.insert(a, prim)) {
            a->second = UsdSkel_AnimQueryImpl::New(prim);
        }
        return UsdSkelAnimQuery(a->second);
    }
    return UsdSkelAnimQuery();
}
开发者ID:PixarAnimationStudios,项目名称:USD,代码行数:26,代码来源:cacheImpl.cpp

示例7: TRACE_FUNCTION

void
HdxIntersector::SetResolution(GfVec2i const& widthHeight)
{
    TRACE_FUNCTION();

    // Make sure we're in a sane GL state before attempting anything.
    if (GlfHasLegacyGraphics()) {
        TF_RUNTIME_ERROR("framebuffer object not supported");
        return;
    }

    if (!_drawTarget) {
        // Initialize the shared draw target late to ensure there is a valid GL
        // context, which may not be the case at constructon time.
        _Init(widthHeight);
        return;
    }

    if (widthHeight == _drawTarget->GetSize()){
        return;
    }

    // Make sure master draw target is always modified on the shared context,
    // so we access it consistently.
    GlfSharedGLContextScopeHolder sharedContextHolder;
    {
        _drawTarget->Bind();
        _drawTarget->SetSize(widthHeight);
        _drawTarget->Unbind();
    }
}
开发者ID:c64kernal,项目名称:USD,代码行数:31,代码来源:intersector.cpp

示例8: TRACE_FUNCTION

	void bigfixedTest::testInitialise()
	{
		TRACE_FUNCTION();

		fixed_128_64 v;
		verify ("init default", v.toDecString() == "0.0");

		v = fixed_128_64(100);
		verify ("init 100", v.toDecString() == "100.0");
		
		v = fixed_128_64(-100);
		verify ("init -100", v.toDecString() == "-100.0");

		v = fixed_128_64(1.0);
		verify ("init 1.0", v.toDecString() == "1.0");

		v = fixed_128_64 (1000.0);
		verify ("init 1000.0", v.toDecString() == "1000.0");

		v = fixed_128_64 (1000.125);
		verify ("init 1000.125", v.toDecString() == "1000.125");

		v = fixed_128_64 (0.0001220703125);
		verify ("init 0.0001220703125", v.toDecString() == "0.0001220703125");

		v = fixed_128_64 (-0.00000762939453125);
		verify ("init -0.00000762939453125", v.toDecString() == "-0.00000762939453125");

		fixed_128_128 v2 = fixed_128_128 (std::numeric_limits<double>::denorm_min());
		verify ("init subnormal", v2.toDecString() == "0.0");

		v = fixed_128_64 (-2000.123456);
		double d = v.toDouble();
	}
开发者ID:simulatedsimian,项目名称:bignum,代码行数:34,代码来源:bigfixedTest.cpp

示例9: TRACE_FUNCTION

bool
Usd_ClipCache::PopulateClipsForPrim(
    const SdfPath& path, const PcpPrimIndex& primIndex)
{
    TRACE_FUNCTION();

    std::vector<Clips> allClips;
    Clips clipsFromNode;
    _AddClipsFromNode(primIndex, &clipsFromNode);
    if (!clipsFromNode.valueClips.empty()) {
        allClips.push_back(clipsFromNode);
    }

    const bool primHasClips = !allClips.empty();
    if (primHasClips) {
        tbb::mutex::scoped_lock lock(_mutex);

        const std::vector<Clips>& ancestralClips = 
            _GetClipsForPrim_NoLock(path.GetParentPath());
        allClips.insert(
            allClips.end(), ancestralClips.begin(), ancestralClips.end());

        TF_DEBUG(USD_CLIPS).Msg(
            "Populated clips for prim <%s>\n", 
            path.GetString().c_str());

        _table[path].swap(allClips);
    }

    return primHasClips;
}
开发者ID:davidgyu,项目名称:USD,代码行数:31,代码来源:clipCache.cpp

示例10: TRACE_FUNCTION

/////////////////////////////////////////////////////////////////////////////
// IShellView
HRESULT CSEShellView::AddPropertySheetPages(
    DWORD /*dwReserved*/,
    LPFNADDPROPSHEETPAGE /*lpfn*/, 
    LPARAM /*lParam*/)
{
    TRACE_FUNCTION();
    TRACE_RETURN E_NOTIMPL;
}
开发者ID:winwingy,项目名称:Study,代码行数:10,代码来源:SEShellView.cpp

示例11: Recursion

void Recursion(int N)
{
    TRACE_FUNCTION();
    if (N <= 1) {
        return;
    }
    Recursion(N-1);
}
开发者ID:PixarAnimationStudios,项目名称:USD,代码行数:8,代码来源:testTraceReportPerf.cpp

示例12: TRACE_FUNCTION

bool
HdSt_MeshTopology::operator==(HdSt_MeshTopology const &other) const {

    TRACE_FUNCTION();

    // no need to compare _adajency and _quadInfo
    return HdMeshTopology::operator==(other);
}
开发者ID:lvxejay,项目名称:USD,代码行数:8,代码来源:meshTopology.cpp

示例13: tag

PcpPrimIndex_GraphRefPtr 
PcpPrimIndex_Graph::New(const PcpPrimIndex_GraphPtr& copy)
{
    TfAutoMallocTag2 tag("Pcp", "PcpPrimIndex_Graph");

    TRACE_FUNCTION();

    return TfCreateRefPtr(
        new PcpPrimIndex_Graph(*boost::get_pointer(copy)));
}
开发者ID:lvxejay,项目名称:USD,代码行数:10,代码来源:primIndex_Graph.cpp

示例14: TRACE_FUNCTION

void
GlfTextureRegistry::GarbageCollectIfNeeded()
{
    // Even if we hold the list of texture handles to be deleted, we have to
    // traverse entire map to remove the entry for them. So simple flag works
    // enough to avoid unnecessary process.
    if (!_requiresGarbageCollection) return;

    // XXX:
    // Frequent garbage collection causing slow UI when reading textures.
    // We're freeing and re-loading textures instead of caching them.
    // 
    // Can we only garbage collect when GPU memory is high?  Or have a
    // least-recently-used queue or something?
    TRACE_FUNCTION();

    std::map<std::pair<TfToken, GlfImage::ImageOriginLocation>,
             _TextureMetadata>::iterator it =
        _textureRegistry.begin();
    while (it != _textureRegistry.end()){
        const GlfTextureHandleRefPtr &handle = it->second.GetHandle();

        // Null handles should not have been added to the registry
        if (TF_VERIFY(handle) && handle->IsUnique()) {
            it = _textureRegistry.erase(it);
            // TextureHandle (and its GlfTexture) will be released here.
        } else {
            ++it;
        }
    }

    // we only have a weakptr for non-shared texture handle (i.e. DrawTarget)
    // note: Since the lifetime of drawtarget attachment is controlled by
    // GlfDrawTarget, even though there are no samplers refers to that
    // attachment, it may still exists when this GC function is called.
    // As a result the entry of textureHandle might remain in 
    // _textureRegistryNonShared, but it just holds an invalid WeakPtr and 
    // will be cleaned at the next GC opportunity. so it's no harm.
    {
        std::map<GlfTexturePtr, GlfTextureHandlePtr>::iterator it =
            _textureRegistryNonShared.begin();
        while (it != _textureRegistryNonShared.end() ){
            if (it->second.IsExpired()) {
                // TextureHandle has already been released by its owner
                // (GlfDrawTarget)
                _textureRegistryNonShared.erase(it++);
            } else {
                ++it;
            }
        }
    }

    _requiresGarbageCollection = false;
}
开发者ID:PixarAnimationStudios,项目名称:USD,代码行数:54,代码来源:textureRegistry.cpp

示例15: close_fifo

void close_fifo( void )
/***********************************************************************/
{
   TRACE_FUNCTION("single.c:  close_fifo");
   TerminateThread( hThread, 0 );
   DisconnectNamedPipe( (HANDLE)fifo_fd );
   CloseHandle( (HANDLE)fifo_fd );
   CloseHandle( (HANDLE)hPipeRead );
   CloseHandle( (HANDLE)hSemCommandCount );
   TRACE_RETURN();
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:11,代码来源:single.c


注:本文中的TRACE_FUNCTION函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。