8dd0ed0240
SWDEV-147340 - Added function UpdateAppPowerProfile() that notices KMD to update applicaiton profile. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.cpp#20 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.hpp#13 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#82 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#45 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os.hpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os_posix.cpp#43 edit ... //depot/stg/opencl/drivers/opencl/runtime/os/os_win32.cpp#49 edit
53 строки
1.3 KiB
C++
53 строки
1.3 KiB
C++
//
|
|
// Copyright (c) 2014 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
#ifndef APPPROFILE_HPP_
|
|
#define APPPROFILE_HPP_
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
namespace amd {
|
|
|
|
class AppProfile {
|
|
public:
|
|
AppProfile();
|
|
virtual ~AppProfile();
|
|
|
|
bool init();
|
|
|
|
const std::string& GetBuildOptsAppend() const { return buildOptsAppend_; }
|
|
|
|
const std::string& appFileName() const { return appFileName_; }
|
|
const std::wstring& wsAppPathAndFileName() const { return wsAppPathAndFileName_; }
|
|
|
|
protected:
|
|
enum DataTypes {
|
|
DataType_Unknown = 0,
|
|
DataType_Boolean,
|
|
DataType_String,
|
|
};
|
|
|
|
struct PropertyData {
|
|
PropertyData(DataTypes type, void* data) : type_(type), data_(data) {}
|
|
DataTypes type_; //!< Data type
|
|
void* data_; //!< Pointer to the data
|
|
};
|
|
|
|
typedef std::map<std::string, PropertyData> DataMap;
|
|
|
|
DataMap propertyDataMap_;
|
|
std::string appFileName_; // without extension
|
|
std::wstring wsAppFileName_;
|
|
std::string appPathAndFileName_; // with path and extension
|
|
std::wstring wsAppPathAndFileName_;
|
|
|
|
virtual bool ParseApplicationProfile();
|
|
|
|
bool gpuvmHighAddr_; // Currently not used.
|
|
bool profileOverridesAllSettings_; // Overrides hint flags and env.var.
|
|
std::string buildOptsAppend_;
|
|
};
|
|
}
|
|
#endif
|