Files
handleaiuinew/env/halcon/include/halconcpp/HDlDevice.h
T
2024-05-18 23:53:26 +08:00

138 lines
3.5 KiB
C++

/***********************************************************
* File generated by the HALCON-Compiler hcomp version 20.11
* Usage: Interface to C++
*
* Software by: MVTec Software GmbH, www.mvtec.com
***********************************************************/
#ifndef HCPP_HDLDEVICE
#define HCPP_HDLDEVICE
namespace HalconCpp
{
// Represents an instance of a Deep Learning capable compute device.
class LIntExport HDlDevice : public HHandle
{
public:
// Create an uninitialized instance
HDlDevice():HHandle() {}
// Copy constructor
HDlDevice(const HDlDevice& source) : HHandle(source) {}
// Copy constructor
HDlDevice(const HHandle& handle);
// Create HDlDevice from handle, taking ownership
explicit HDlDevice(Hlong handle);
bool operator==(const HHandle& obj) const
{
return HHandleBase::operator==(obj);
}
bool operator!=(const HHandle& obj) const
{
return HHandleBase::operator!=(obj);
}
protected:
// Verify matching semantic type ('dl_device')!
virtual void AssertType(Hphandle handle) const;
public:
/***************************************************************************
* Operators *
***************************************************************************/
// Return the parameters of a deep-learning-capable hardware device.
HTuple GetDlDeviceParam(const HString& GenParamName) const;
// Return the parameters of a deep-learning-capable hardware device.
HTuple GetDlDeviceParam(const char* GenParamName) const;
#ifdef _WIN32
// Return the parameters of a deep-learning-capable hardware device.
HTuple GetDlDeviceParam(const wchar_t* GenParamName) const;
#endif
// Get list of deep-learning-capable hardware devices.
static HDlDeviceArray QueryAvailableDlDevices(const HTuple& GenParamName, const HTuple& GenParamValue);
// Get list of deep-learning-capable hardware devices.
void QueryAvailableDlDevices(const HString& GenParamName, const HString& GenParamValue);
// Get list of deep-learning-capable hardware devices.
void QueryAvailableDlDevices(const char* GenParamName, const char* GenParamValue);
#ifdef _WIN32
// Get list of deep-learning-capable hardware devices.
void QueryAvailableDlDevices(const wchar_t* GenParamName, const wchar_t* GenParamValue);
#endif
};
// forward declarations and types for internal array implementation
template<class T> class HSmartPtr;
template<class T> class HHandleBaseArrayRef;
typedef HHandleBaseArrayRef<HDlDevice> HDlDeviceArrayRef;
typedef HSmartPtr< HDlDeviceArrayRef > HDlDeviceArrayPtr;
// Represents multiple tool instances
class LIntExport HDlDeviceArray : public HHandleBaseArray
{
public:
// Create empty array
HDlDeviceArray();
// Create array from native array of tool instances
HDlDeviceArray(HDlDevice* classes, Hlong length);
// Copy constructor
HDlDeviceArray(const HDlDeviceArray &tool_array);
// Destructor
virtual ~HDlDeviceArray();
// Assignment operator
HDlDeviceArray &operator=(const HDlDeviceArray &tool_array);
// Clears array and all tool instances
virtual void Clear();
// Get array of native tool instances
const HDlDevice* Tools() const;
// Get number of tools
virtual Hlong Length() const;
// Create tool array from tuple of handles
virtual void SetFromTuple(const HTuple& handles);
// Get tuple of handles for tool array
virtual HTuple ConvertToTuple() const;
protected:
// Smart pointer to internal data container
HDlDeviceArrayPtr *mArrayPtr;
};
}
#endif