fix file-not-found detection

Change-Id: Ida84923ed18b3ebf8ffcfd6ee84d8a72f611ecd3
This commit is contained in:
Ben Sander
2016-10-13 11:43:49 -05:00
parent b70409f3ad
commit fa075091b5
+2 -2
View File
@@ -118,10 +118,10 @@ hipError_t hipModuleLoad(hipModule_t *module, const char *fname){
ihipDevice_t *currentDevice = ihipGetDevice(deviceId);
std::ifstream in(fname, std::ios::binary | std::ios::ate);
if(!in){
if(!in.is_open() ){
return ihipLogStatus(hipErrorFileNotFound);
}else{
} else {
*module = new ihipModule_t;
size_t size = std::string::size_type(in.tellg());