Fix Agent_global variables failing hipTestDeviceSymbol

Issue: Header uses std::vector<Agent_global> agent_globals which is created by hip_module.cpp
  - Move iterator fails to copy Agent_global from library source into header version
  - Due to different versions of std::string name in struct Agent_global
Fix: Change Agent_global to use char* name instead of std::string name
이 커밋은 다음에 포함됨:
Aaron Enye Shi가 2019-03-11 19:51:25 +00:00를 커밋했습니다
1 부모 f8aca3159c
커밋 fcde9fe3df
2 파일이 변경됨
+7 -4

검색과 일치하는 파일 없음

+2 -2
파일 보기
@@ -2506,7 +2506,7 @@ hipError_t hipModuleGetFunction(hipFunction_t* function, hipModule_t module, con
hipError_t hipFuncGetAttributes(hipFuncAttributes* attr, const void* func);
struct Agent_global {
std::string name;
char* name;
hipDeviceptr_t address;
uint32_t byte_cnt;
};
@@ -2524,7 +2524,7 @@ template<typename ForwardIterator>
std::pair<hipDeviceptr_t, std::size_t> read_global_description(
ForwardIterator f, ForwardIterator l, const char* name) {
const auto it = std::find_if(f, l, [=](const Agent_global& x) {
return x.name == name;
return strcmp(x.name, name) == 0;
});
return it == l ?