File info.hpp¶
Functions
-
std::unique_ptr<ILibraryInfo> getLibraryInfo()¶
Returns an object of type
ILibraryVersion
that provides information about this C++ library.- Returns:
An unique pointer to an object of type
ILibraryVersion
-
bool isMultiThreadingSupportEnabled()¶
Returns whether multi-threading support was enabled at compile-time or not.
- Returns:
True, if multi-threading support is enabled, false otherwise
-
uint32 getNumCpuCores()¶
Returns the number of CPU cores available on the machine, regardless of whether multi-threading support is enabled or not.
- Returns:
The number of CPU cores available on the machine
-
bool isGpuSupportEnabled()¶
Returns whether GPU support was enabled at compile-time or not.
- Returns:
True, if GPU support is enabled, false otherwise
-
bool isGpuAvailable()¶
Returns whether any supported GPUs are available on the machine or not.
- Returns:
True, if at least one supported GPU is available, false otherwise
-
std::vector<std::string> getGpuDevices()¶
Returns the names of all supported GPUs available on the machine.
- Returns:
An
std::vector
that contains the names of all supported GPUs
-
class ILibraryInfo¶
- #include <info.hpp>
Defines an interface for all classes that provide information about a C++ library.
Public Types
-
typedef std::function<void(const BuildOption&)> BuildOptionVisitor¶
A visitor function for handling objects of the type
BuildOption
.
-
typedef std::function<void(const HardwareResource&)> HardwareResourceVisitor¶
A visitor function for handling objects of the type
HardwareResource
.
Public Functions
-
inline virtual ~ILibraryInfo()¶
-
virtual std::string getLibraryName() const = 0¶
Returns the name of the C++ library.
- Returns:
A string that specifies the library name
-
virtual std::string getLibraryVersion() const = 0¶
Returns the version of the C++ library.
- Returns:
A string that specifies the library version
-
virtual std::string getTargetArchitecture() const = 0¶
Returns the architecture that is targeted by the C++ library.
- Returns:
A string that specifies the target architecture
-
inline virtual void visitBuildOptions(BuildOptionVisitor visitor) const¶
May be overridden by subclasses in order to invoke a given visitor function for each available build option.
- Parameters:
visitor – A visitor function for handling objects of the type
BuildOption
-
inline virtual void visitHardwareResources(HardwareResourceVisitor visitor) const¶
May be overridden by subclasses in order to invoke a given visitor function for each available hardware resource.
- Parameters:
visitor – A visitor function for handling objects of the type
HardwareResource
-
struct BuildOption¶
- #include <info.hpp>
Represents a build option for configuring a library at compile-time.
Public Functions
-
inline BuildOption(std::string option, std::string description, std::string value)¶
- Parameters:
option – The name of the build option
description – A human-legible description of the build option
value – The value that has been set for the build option at compile-time
-
inline BuildOption(std::string option, std::string description, std::string value)¶
-
struct HardwareResource¶
- #include <info.hpp>
Provides information about a certain hardware resource.
Public Functions
-
inline HardwareResource(std::string resource, std::string info)¶
- Parameters:
resource – A human-legible name of the hardware resource
info – The information associated with the hardware resource
-
inline HardwareResource(std::string resource, std::string info)¶
-
typedef std::function<void(const BuildOption&)> BuildOptionVisitor¶