move getEnvVar function to common (#299)
[ROCm/rocdecode commit: d5b5a31881]
This commit is contained in:
@@ -1104,15 +1104,3 @@ bool RocVideoDecoder::InitHIP(int device_id) {
|
||||
HIP_API_CALL(hipStreamCreate(&hip_stream_));
|
||||
return true;
|
||||
}
|
||||
|
||||
int GetEnvVar(const char *name, int &dev_count) {
|
||||
char *v = std::getenv(name);
|
||||
if (v) {
|
||||
char* p_tkn = std::strtok(v, ",");
|
||||
while (p_tkn != nullptr) {
|
||||
dev_count++;
|
||||
p_tkn = strtok(nullptr, ",");
|
||||
}
|
||||
}
|
||||
return dev_count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user