SWDEV-301289 - Treewide macro rename
ATI_OS_WIN -> _WIN32 ATI_OS_LINUX -> __linux__ We should not rely on non-standard macros for platform detections. Change-Id: If1d06e2e1187268df62a59609ea5496ab7eb709d
This commit is contained in:
1 parent
159f7f24cd
commit
c4aa6febe5
27 files changed
+92
-93
No files matched your search
@@ -26,7 +26,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <sstream>
|
||||
#ifdef ATI_OS_LINUX
|
||||
#ifdef __linux__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,7 @@ void OCLCreateBuffer::run(void) {
|
||||
_wrapper->clFinish(cmdQueues_[_deviceId]);
|
||||
|
||||
size_t maxSteps = maxSize_;
|
||||
#ifdef ATI_OS_LINUX
|
||||
#ifdef __linux__
|
||||
long pages = sysconf(_SC_PHYS_PAGES);
|
||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||
if (maxSteps > (size_t)(pages * page_size / 2)) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <sstream>
|
||||
#ifdef ATI_OS_LINUX
|
||||
#ifdef __linux__
|
||||
#include <sys/sysinfo.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -194,7 +194,7 @@ void OCLCreateImage::open(unsigned int test, char *units, double &conversion,
|
||||
if (ImageSizeY >= max2DHeight) {
|
||||
ImageSizeY = max2DHeight - 0x1000;
|
||||
}
|
||||
#ifdef ATI_OS_LINUX
|
||||
#ifdef __linux__
|
||||
// On linux, if the size of total system memory is less than 4GB,
|
||||
// then, we can allocate much smaller image.
|
||||
// TODO, need to find the root cause
|
||||
@@ -289,7 +289,7 @@ void OCLCreateImage::open(unsigned int test, char *units, double &conversion,
|
||||
float *data;
|
||||
size_t ActualImageSizeY = ImageSizeY;
|
||||
size_t maxImageSize = maxSize_;
|
||||
#ifdef ATI_OS_LINUX
|
||||
#ifdef __linux__
|
||||
long pages = sysconf(_SC_PHYS_PAGES);
|
||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||
if (maxImageSize > ((size_t)pages * page_size)) {
|
||||
@@ -357,7 +357,7 @@ void OCLCreateImage::open(unsigned int test, char *units, double &conversion,
|
||||
|
||||
size_t ActualImageSizeZ = ImageSizeZ;
|
||||
size_t maxImageSize = maxSize_;
|
||||
#ifdef ATI_OS_LINUX
|
||||
#ifdef __linux__
|
||||
long pages = sysconf(_SC_PHYS_PAGES);
|
||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||
if (maxImageSize > ((size_t)pages * page_size)) {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "CL/cl.h"
|
||||
#include "CL/cl_ext.h"
|
||||
|
||||
#if !defined(ATI_OS_LINUX)
|
||||
#if !defined(__linux__)
|
||||
#include "WinBase.h"
|
||||
typedef DWORD(WINAPI* GetThreadId)(__in HANDLE Thread);
|
||||
#endif
|
||||
@@ -63,7 +63,7 @@ void OCLGetQueueThreadID::open(unsigned int test, char* units,
|
||||
static void CL_CALLBACK notify_callback(cl_event event,
|
||||
cl_int event_command_exec_status,
|
||||
void* user_data) {
|
||||
#if defined(ATI_OS_LINUX)
|
||||
#if defined(__linux__)
|
||||
pthread_t id = (pthread_t)user_data;
|
||||
pthread_t handle = pthread_self();
|
||||
#else
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <sstream>
|
||||
#ifdef ATI_OS_LINUX
|
||||
#ifdef __linux__
|
||||
#include <sys/sysinfo.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
@@ -109,7 +109,7 @@ void OCLStablePState::run(void) {
|
||||
cl_set_device_clock_mode_output_amd setClockModeOutput = {};
|
||||
error_ = _wrapper->clSetDeviceClockModeAMD(gpu_device, setClockModeInput,
|
||||
&setClockModeOutput);
|
||||
#ifdef ATI_OS_WIN
|
||||
#ifdef _WIN32
|
||||
CHECK_RESULT(error_ != CL_SUCCESS, "SetClockMode profiling failed\n");
|
||||
#else
|
||||
error_ = CL_SUCCESS;
|
||||
@@ -119,7 +119,7 @@ void OCLStablePState::run(void) {
|
||||
setClockModeOutput = {};
|
||||
error_ = _wrapper->clSetDeviceClockModeAMD(gpu_device, setClockModeInput,
|
||||
&setClockModeOutput);
|
||||
#ifdef ATI_OS_WIN
|
||||
#ifdef _WIN32
|
||||
CHECK_RESULT(error_ != CL_SUCCESS, "SetClockMode default failed\n");
|
||||
#else
|
||||
error_ = CL_SUCCESS;
|
||||
|
||||
Reference in new issue
Block a user