forked from GPUOpen-Tools/gpu_performance_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutility.h
36 lines (30 loc) · 1.31 KB
/
utility.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//==============================================================================
// Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All rights reserved.
/// @author AMD Developer Tools Team
/// @file
/// @brief Utility macros, constants and function declarations.
//==============================================================================
#ifndef GPU_PERF_API_COMMON_UTILITY_H_
#define GPU_PERF_API_COMMON_UTILITY_H_
#include <string>
/// @brief Namespace for GPA utility methods.
namespace gpa_util
{
/// @brief Convert a C wide character string to string.
///
/// @param [in] wide_char_array Wide character string.
/// @param [out] str ASCII string.
void WideCharArrayToString(const wchar_t* wide_char_array, std::string& str);
/// @brief Convert a wide character string to string.
///
/// @param [in] wide_string Wide character string.
/// @param [out] str ASCII string.
void WideStringToString(const std::wstring& wide_string, std::string& str);
/// @brief Returns the path of the current module.
///
/// @param [out] current_module_path Path of the module from where it was loaded.
///
/// @return True upon successful operation otherwise false.
bool GetCurrentModulePath(std::string& current_module_path);
}
#endif // GPU_PERF_API_COMMON_UTILITY_H_