NVIDIA NvNeural SDK  2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
RefPtr.h File Reference

Smart pointer class for tracking IRefObject instances. More...

#include <nvneural/CoreTypes.h>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

class  nvneural::RefPtr< TObject >::GenericOutputWrapper
 Version of OutputWrapper that presents a generic IRefObject** instead. More...
 
struct  std::hash< nvneural::RefPtr< TObject > >
 Specialize std::hash for RefPtr objects. More...
 
class  nvneural::RefPtr< TObject >::OutputWrapper
 Details type that allows version-safe use of out-pointer parameters without converting through an intermediate raw pointer variable or mismatching fromPointer/fromPointerNoAddRef. More...
 
class  nvneural::RefPtr< TObject >
 Intrusive pointer using IRefObject's reference counting system. More...
 

Functions

template<typename TObject , typename TIntermediate = void, typename... TArguments>
RefPtr< IRefObject > nvneural::make_refobject (TArguments &&... args) noexcept
 Creates a RefPtr pointing to a new object instance, forwarding constructor arguments. More...
 

Detailed Description

Smart pointer class for tracking IRefObject instances.

Function Documentation

◆ make_refobject()

template<typename TObject , typename TIntermediate = void, typename... TArguments>
RefPtr<IRefObject> nvneural::make_refobject ( TArguments &&...  args)
inlinenoexcept

Creates a RefPtr pointing to a new object instance, forwarding constructor arguments.

Example: pStringList = make_refobject<StringList>(stringVector).as<IStringList>();

Template Parameters
TObjectClass type to create
TIntermediateIf casting from TObject* to IRefObject* is ambiguous, provide this to specify the path
TArgumentsParameter pack of constructor arguments
Parameters
argsArgument list to provide to the constructor