2014-07-04 16:17:05 -04:00
|
|
|
//
|
|
|
|
|
// Copyright (c) 2014 Advanced Micro Devices, Inc. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
#ifndef APPPROFILE_HPP_
|
|
|
|
|
#define APPPROFILE_HPP_
|
|
|
|
|
|
2018-04-04 18:00:17 -04:00
|
|
|
#include <unordered_map>
|
2014-07-04 16:17:05 -04:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
namespace amd {
|
|
|
|
|
|
|
|
|
|
class AppProfile {
|
2017-04-13 13:56:38 -04:00
|
|
|
public:
|
|
|
|
|
AppProfile();
|
|
|
|
|
virtual ~AppProfile();
|
2014-07-04 16:17:05 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
bool init();
|
2014-07-04 16:17:05 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
const std::string& GetBuildOptsAppend() const { return buildOptsAppend_; }
|
2017-03-31 15:51:21 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
const std::string& appFileName() const { return appFileName_; }
|
2018-04-02 17:15:51 -04:00
|
|
|
const std::wstring& wsAppPathAndFileName() const { return wsAppPathAndFileName_; }
|
2017-03-31 15:51:21 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
protected:
|
|
|
|
|
enum DataTypes {
|
|
|
|
|
DataType_Unknown = 0,
|
|
|
|
|
DataType_Boolean,
|
|
|
|
|
DataType_String,
|
|
|
|
|
};
|
2014-09-23 12:44:50 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
struct PropertyData {
|
|
|
|
|
PropertyData(DataTypes type, void* data) : type_(type), data_(data) {}
|
|
|
|
|
DataTypes type_; //!< Data type
|
|
|
|
|
void* data_; //!< Pointer to the data
|
|
|
|
|
};
|
2014-09-23 12:44:50 -04:00
|
|
|
|
2018-04-04 18:00:17 -04:00
|
|
|
typedef std::unordered_map<std::string, PropertyData> DataMap;
|
2014-09-23 12:44:50 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
DataMap propertyDataMap_;
|
|
|
|
|
std::string appFileName_; // without extension
|
|
|
|
|
std::wstring wsAppFileName_;
|
2018-04-02 17:15:51 -04:00
|
|
|
std::string appPathAndFileName_; // with path and extension
|
|
|
|
|
std::wstring wsAppPathAndFileName_;
|
2014-07-04 16:17:05 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
virtual bool ParseApplicationProfile();
|
2014-07-04 16:17:05 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
bool gpuvmHighAddr_; // Currently not used.
|
|
|
|
|
bool profileOverridesAllSettings_; // Overrides hint flags and env.var.
|
|
|
|
|
std::string buildOptsAppend_;
|
2014-07-04 16:17:05 -04:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
#endif
|