File PlatformConfig.hpp

Parent directory (DlSystem)

Definition (DlSystem/PlatformConfig.hpp)

Includes

Full File Listing

namespace DlSystem
struct UserGLConfig
#include <PlatformConfig.hpp>

Public Members

void *userGLContext = nullptr

Holds user EGL context.

void *userGLDisplay = nullptr

Holds user EGL display.

struct UserGpuConfig
#include <PlatformConfig.hpp>

Public Members

UserGLConfig userGLConfig

Holds user OpenGL configuration.

class PlatformConfig
#include <PlatformConfig.hpp>

Public Types

enum class PlatformType_t

An enum class of all supported platform types

Values:

enumerator UNKNOWN = 0

Unknown platform type.

enumerator CPU = 1

Snapdragon CPU.

enumerator GPU = 2

Adreno GPU.

enumerator DSP = 3

Hexagon DSP.

Public Functions

~PlatformConfig() = default
PlatformConfig()

Creates a new PlatformConfig.

PlatformConfig(const PlatformConfig &other)

Copy-Construct a PlatformConfig from another PlatformConfig.

Parameters

other[in] Source PlatformConfig

Returns

Handle to the Copy-Constructed PlatformConfig

PlatformType_t getPlatformType() const

Retrieves the platform type.

Returns

Platform type

bool isValid() const

Indicates whther the plaform configuration is valid.

Returns

True if the platform configuration is valid; false otherwise.

bool getUserGpuConfig(UserGpuConfig &userGpuConfig) const

Retrieves the Gpu configuration.

Parameters

userGpuConfig[out] The passed in userGpuConfig populated with the Gpu configuration on return.

Returns

True if Gpu configuration was retrieved; false otherwise.

bool setUserGpuConfig(UserGpuConfig &userGpuConfig)

Sets the Gpu configuration.

Parameters

userGpuConfig[in] Gpu Configuration

Returns

True if Gpu configuration was successfully set; false otherwise.

bool setPlatformOptions(const std::string &options)

Sets the platform options.

Parameters

options[in] Options as a string in the form of “keyword:options”

Returns

True if options are pass validation; otherwise false. If false, the options are not updated.

bool isOptionsValid() const

Indicates whther the plaform configuration is valid.

Returns

True if the platform configuration is valid; false otherwise.

std::string getPlatformOptions() const

Gets the platform options.

Returns

Options as a string

bool setPlatformOptionValue(const std::string &optionName, const std::string &value)

Sets the platform options.

Parameters
  • optionName[in] Name of platform options”

  • value[in] Value of specified optionName

Returns

If true, add “optionName:value” to platform options if optionName don’t exist, otherwise update the value of specified optionName. If false, the platform options will not be changed.

bool removePlatformOptionValue(const std::string &optionName, const std::string &value)

Removes the platform options.

Parameters
  • optionName[in] Name of platform options”

  • value[in] Value of specified optionName

Returns

If true, removed “optionName:value” to platform options if optionName don’t exist, do nothing. If false, the platform options will not be changed.

Public Static Functions

static void SetIsUserGLBuffer(bool isUserGLBuffer)
static bool GetIsUserGLBuffer()
struct PlatformConfigInfo
#include <PlatformConfig.hpp>

A union class user platform configuration information

Public Members

UserGpuConfig userGpuConfig

Holds user GPU Configuration.

class UserGLConfigInternal

Public Functions

UserGLConfigInternal()
UserGLConfigInternal(const UserGLConfig &uglc)
void setUserGLContext(void *userGLContext)

Sets the EGL context.

Parameters

userGLContext[in] : void pointer

void setUserGLDisplay(void *userGLDisplay)

Sets the EGL Display.

Parameters

userGLDisplay[in] : void pointer

void *getUserGLContext()

Get EGL context.

Returns

userGLContext of type void pointer

void *getUserGLDisplay()

Get EGL Display.

Returns

userGLDisplay of type void pointer

class UserGpuConfigInternal

Public Functions

UserGpuConfigInternal()

Creates a new userGpuConfig.

void set(const UserGLConfig &userGLConfig)

Set the userGpuConfig.

Parameters

glHandle[in] : Handle needed to access userGlConfig

Returns

Error code. Returns SNPE_SUCCESS if destruction successful

void get(UserGLConfig &uglc)

Get the userGpuConfig.

Returns

Handle needed to access userGlConfig