Updated hipEnvVarDriver to work with Windows (#1614)

* Updated hipEnvVarDriver to work with Windows

* Cleaned up a bit of code

* Fixed a part where putenv was used for both win and linux

* Defines moved to test_common.h and cleaned up code

* Cleaned up some macro defines and used const char instead

* Got rid of some excess commenting

* directory paths are unconditional

* Cleaned some duplicate code, and variables are now declared and defined together
This commit is contained in:
jiabaxie
2019-11-18 01:48:29 -05:00
committed by Maneesh Gupta
parent 0a68be8b5b
commit e73927caee
3 changed files with 39 additions and 26 deletions
+4
View File
@@ -104,6 +104,7 @@ THE SOFTWARE.
#define popen(x,y) _popen(x,y)
#define pclose(x) _pclose(x)
#define setenv(x,y,z) _putenv_s(x,y)
#define unsetenv _putenv
#else
#define aligned_free(x) free(x)
#endif
@@ -120,6 +121,9 @@ extern unsigned threadsPerBlock;
extern int p_gpuDevice;
extern unsigned p_verbose;
extern int p_tests;
extern const char* HIP_VISIBLE_DEVICES_STR;
extern const char* CUDA_VISIBLE_DEVICES_STR;
extern const char* PATH_SEPERATOR_STR;
// ********************* CPP section *********************
#ifdef __cplusplus