Enrollment 28.2.0
Loading...
Searching...
No Matches
InitializerConfigBuilder Class Reference

Fluent builder for InitializerConfig. More...

#include <InitializerConfig.h>

Collaboration diagram for InitializerConfigBuilder:

Public Member Functions

InitializerConfigBuilder & UseAllAvailableCores ()
 Use all available CPU cores for each face/iris thread pool.
InitializerConfigBuilder & UseSingleCore ()
 Limit each face/iris thread pool to a single thread.
InitializerConfigBuilder & SetLicenseContent (std::vector< uint8_t > content)
 Sets embedded license bytes.
InitializerConfigBuilder & SetLicensePath (const std::string &path)
 Sets license content from given license file.
InitializerConfigBuilder & SetModelsPath (std::string path)
 Sets the IFace models directory path.
InitializerConfigBuilder & SetFaceIrisOpencvThreads (int count)
 Sets the OpenCV thread count for face and iris processing.
InitializerConfigBuilder & SetFaceIrisOrtIntraThreads (int count)
 Sets the ONNX Runtime intra-op thread count for face and iris processing.
InitializerConfigBuilder & SetFaceIrisOrtInterThreads (int count)
 Sets the ONNX Runtime inter-op thread count for face and iris processing.
InitializerConfig Build ()
 Builds and returns the configuration.

Detailed Description

Fluent builder for InitializerConfig.

InitializerConfigBuilder::Build() fails unless every thread pool was configured via InitializerConfigBuilder::UseAllAvailableCores(), InitializerConfigBuilder::UseSingleCore(), or the three SetFaceIris*Threads methods.

Member Function Documentation

◆ Build()

InitializerConfig Build ( )
inlinenodiscard

Builds and returns the configuration.

Returns
validated initialisation configuration
Exceptions
EnrollmentInvalidArgumentExceptionwhen license content is not set
EnrollmentInvalidArgumentExceptionwhen model path is not set
EnrollmentInvalidArgumentExceptionwhen not all face/iris thread pools were configured
EnrollmentInvalidArgumentExceptionwhen a thread count is negative
FileExceptionif given license file is not accessible

Referenced by Initialize().

Here is the caller graph for this function:

◆ SetFaceIrisOpencvThreads()

InitializerConfigBuilder & SetFaceIrisOpencvThreads ( int count)
inline

Sets the OpenCV thread count for face and iris processing.

Parameters
countthread count (0 means all available cores)
Returns
reference to this builder

◆ SetFaceIrisOrtInterThreads()

InitializerConfigBuilder & SetFaceIrisOrtInterThreads ( int count)
inline

Sets the ONNX Runtime inter-op thread count for face and iris processing.

Parameters
countthread count (0 means all available cores)
Returns
reference to this builder

◆ SetFaceIrisOrtIntraThreads()

InitializerConfigBuilder & SetFaceIrisOrtIntraThreads ( int count)
inline

Sets the ONNX Runtime intra-op thread count for face and iris processing.

Parameters
countthread count (0 means all available cores)
Returns
reference to this builder

◆ SetLicenseContent()

InitializerConfigBuilder & SetLicenseContent ( std::vector< uint8_t > content)
inline

Sets embedded license bytes.

Parameters
contentraw license file content
Returns
reference to this builder

Referenced by Initialize().

Here is the caller graph for this function:

◆ SetLicensePath()

InitializerConfigBuilder & SetLicensePath ( const std::string & path)
inline

Sets license content from given license file.

Parameters
pathPath to license file
Returns
reference to this builder

◆ SetModelsPath()

InitializerConfigBuilder & SetModelsPath ( std::string path)
inline

Sets the IFace models directory path.

Parameters
pathpath to the models directory
Returns
reference to this builder

Referenced by Initialize().

Here is the caller graph for this function:

◆ UseAllAvailableCores()

InitializerConfigBuilder & UseAllAvailableCores ( )
inline

Use all available CPU cores for each face/iris thread pool.

Returns
reference to this builder

◆ UseSingleCore()

InitializerConfigBuilder & UseSingleCore ( )
inline

Limit each face/iris thread pool to a single thread.

Returns
reference to this builder

Referenced by Initialize().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: