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
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Jason Tang
ebeveyn
159f7f24cd
işleme
c4aa6febe5
@@ -134,7 +134,7 @@ cl_icd_dispatch amd::ICDDispatchedObject::icdVendorDispatch_[] = {
|
|||||||
clSetProgramReleaseCallback,
|
clSetProgramReleaseCallback,
|
||||||
clSetProgramSpecializationConstant }};
|
clSetProgramSpecializationConstant }};
|
||||||
|
|
||||||
#if defined(ATI_OS_WIN)
|
#if defined(_WIN32)
|
||||||
#include <Shlwapi.h>
|
#include <Shlwapi.h>
|
||||||
|
|
||||||
#pragma comment(lib, "shlwapi.lib")
|
#pragma comment(lib, "shlwapi.lib")
|
||||||
@@ -260,7 +260,7 @@ static bool ShouldLoadPlatform() {
|
|||||||
return shouldLoad;
|
return shouldLoad;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // defined(ATI_OS_WIN)
|
#endif // defined(_WIN32)
|
||||||
|
|
||||||
CL_API_ENTRY cl_int CL_API_CALL clIcdGetPlatformIDsKHR(cl_uint num_entries,
|
CL_API_ENTRY cl_int CL_API_CALL clIcdGetPlatformIDsKHR(cl_uint num_entries,
|
||||||
cl_platform_id* platforms,
|
cl_platform_id* platforms,
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ bool LiquidFlashFile::open() {
|
|||||||
flags = LF_READ | LF_WRITE;
|
flags = LF_READ | LF_WRITE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
assert(sizeof(wchar_t) != sizeof(lf_char));
|
assert(sizeof(wchar_t) != sizeof(lf_char));
|
||||||
std::string name_char;
|
std::string name_char;
|
||||||
std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> cv;
|
std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> cv;
|
||||||
@@ -130,7 +130,7 @@ bool LiquidFlashFile::transferBlock(bool writeBuffer, void* srcDst, uint64_t buf
|
|||||||
RUNTIME_ENTRY_RET(cl_file_amd, clCreateSsgFileObjectAMD,
|
RUNTIME_ENTRY_RET(cl_file_amd, clCreateSsgFileObjectAMD,
|
||||||
(cl_context context, cl_file_flags_amd flags, const wchar_t* file_name,
|
(cl_context context, cl_file_flags_amd flags, const wchar_t* file_name,
|
||||||
cl_int* errcode_ret)) {
|
cl_int* errcode_ret)) {
|
||||||
#if WITH_LIQUID_FLASH && defined ATI_OS_LINUX
|
#if WITH_LIQUID_FLASH && defined __linux__
|
||||||
if (!is_valid(context)) {
|
if (!is_valid(context)) {
|
||||||
*not_null(errcode_ret) = CL_INVALID_CONTEXT;
|
*not_null(errcode_ret) = CL_INVALID_CONTEXT;
|
||||||
LogWarning("invalid parameter \"context\"");
|
LogWarning("invalid parameter \"context\"");
|
||||||
|
|||||||
Sağlanmış
+10
-10
@@ -20,22 +20,22 @@
|
|||||||
|
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CPerfCounter::CPerfCounter() : _clocks(0), _start(0) {
|
CPerfCounter::CPerfCounter() : _clocks(0), _start(0) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
QueryPerformanceFrequency((LARGE_INTEGER *)&_freq);
|
QueryPerformanceFrequency((LARGE_INTEGER *)&_freq);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
_freq = 1000;
|
_freq = 1000;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ CPerfCounter::~CPerfCounter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CPerfCounter::Start(void) {
|
void CPerfCounter::Start(void) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
if (_start) {
|
if (_start) {
|
||||||
MessageBox(NULL, "Bad Perf Counter Start", "Error", MB_OK);
|
MessageBox(NULL, "Bad Perf Counter Start", "Error", MB_OK);
|
||||||
@@ -54,7 +54,7 @@ void CPerfCounter::Start(void) {
|
|||||||
QueryPerformanceCounter((LARGE_INTEGER *)&_start);
|
QueryPerformanceCounter((LARGE_INTEGER *)&_start);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
|
|
||||||
struct timeval s;
|
struct timeval s;
|
||||||
gettimeofday(&s, 0);
|
gettimeofday(&s, 0);
|
||||||
@@ -66,7 +66,7 @@ void CPerfCounter::Start(void) {
|
|||||||
void CPerfCounter::Stop(void) {
|
void CPerfCounter::Stop(void) {
|
||||||
i64 n;
|
i64 n;
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
if (!_start) {
|
if (!_start) {
|
||||||
MessageBox(NULL, "Bad Perf Counter Stop", "Error", MB_OK);
|
MessageBox(NULL, "Bad Perf Counter Stop", "Error", MB_OK);
|
||||||
@@ -76,7 +76,7 @@ void CPerfCounter::Stop(void) {
|
|||||||
QueryPerformanceCounter((LARGE_INTEGER *)&n);
|
QueryPerformanceCounter((LARGE_INTEGER *)&n);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
|
|
||||||
struct timeval s;
|
struct timeval s;
|
||||||
gettimeofday(&s, 0);
|
gettimeofday(&s, 0);
|
||||||
@@ -90,7 +90,7 @@ void CPerfCounter::Stop(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CPerfCounter::Reset(void) {
|
void CPerfCounter::Reset(void) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
if (_start) {
|
if (_start) {
|
||||||
MessageBox(NULL, "Bad Perf Counter Reset", "Error", MB_OK);
|
MessageBox(NULL, "Bad Perf Counter Reset", "Error", MB_OK);
|
||||||
exit(0);
|
exit(0);
|
||||||
@@ -100,7 +100,7 @@ void CPerfCounter::Reset(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
double CPerfCounter::GetElapsedTime(void) {
|
double CPerfCounter::GetElapsedTime(void) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
if (_start) {
|
if (_start) {
|
||||||
MessageBox(NULL, "Trying to get time while still running.", "Error", MB_OK);
|
MessageBox(NULL, "Trying to get time while still running.", "Error", MB_OK);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
Sağlanmış
+2
-2
@@ -21,10 +21,10 @@
|
|||||||
#ifndef _TIMER_H_
|
#ifndef _TIMER_H_
|
||||||
#define _TIMER_H_
|
#define _TIMER_H_
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
typedef __int64 i64;
|
typedef __int64 i64;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
typedef long long i64;
|
typedef long long i64;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Sağlanmış
+1
-1
@@ -147,7 +147,7 @@ int oclSysInfo(std::string &info_string, bool use_cpu, unsigned dev_id,
|
|||||||
clGetDeviceInfo(device, CL_DEVICE_BOARD_NAME_AMD, sizeof(c), &c, NULL);
|
clGetDeviceInfo(device, CL_DEVICE_BOARD_NAME_AMD, sizeof(c), &c, NULL);
|
||||||
sprintf(tmpString, "\tBoard Name: %s\n", c);
|
sprintf(tmpString, "\tBoard Name: %s\n", c);
|
||||||
info_string.append(tmpString);
|
info_string.append(tmpString);
|
||||||
#if defined(ATI_OS_LINUX)
|
#if defined(__linux__)
|
||||||
cl_device_topology_amd topology;
|
cl_device_topology_amd topology;
|
||||||
clGetDeviceInfo(device, CL_DEVICE_TOPOLOGY_AMD, sizeof(topology), &topology,
|
clGetDeviceInfo(device, CL_DEVICE_TOPOLOGY_AMD, sizeof(topology), &topology,
|
||||||
NULL);
|
NULL);
|
||||||
|
|||||||
Sağlanmış
+17
-17
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <CL/cl.h>
|
#include <CL/cl.h>
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "Window.h"
|
#include "Window.h"
|
||||||
@@ -31,7 +31,7 @@ typedef HMODULE ModuleHandle;
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
typedef void* ModuleHandle;
|
typedef void* ModuleHandle;
|
||||||
#endif
|
#endif
|
||||||
@@ -68,7 +68,7 @@ static OCLutil::Lock moduleLock;
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
static LONG WINAPI xFilter(LPEXCEPTION_POINTERS xEP);
|
static LONG WINAPI xFilter(LPEXCEPTION_POINTERS xEP);
|
||||||
void serviceStubCall();
|
void serviceStubCall();
|
||||||
#endif
|
#endif
|
||||||
@@ -386,7 +386,7 @@ void App::printOCLinfo(void) {
|
|||||||
/*-----------------------------------------------------
|
/*-----------------------------------------------------
|
||||||
Function to randomize the order in which tests are executed
|
Function to randomize the order in which tests are executed
|
||||||
-------------------------------------------------------*/
|
-------------------------------------------------------*/
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
// void App::SetTestRunOrder(int test_count)
|
// void App::SetTestRunOrder(int test_count)
|
||||||
@@ -745,7 +745,7 @@ void App::PrintTestOrder(int mod_index) {
|
|||||||
|
|
||||||
//! Function that runs all the tests specified in the command-line
|
//! Function that runs all the tests specified in the command-line
|
||||||
void App::RunAllTests() {
|
void App::RunAllTests() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
if (!m_console) m_window = new Window("Test", 100, 100, m_width, m_height, 0);
|
if (!m_console) m_window = new Window("Test", 100, 100, m_width, m_height, 0);
|
||||||
#endif
|
#endif
|
||||||
@@ -889,7 +889,7 @@ void App::RunAllTests() {
|
|||||||
"##teamcity[testSuiteFinished name='ocltst']\n");
|
"##teamcity[testSuiteFinished name='ocltst']\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
if (!m_console && m_window) {
|
if (!m_console && m_window) {
|
||||||
((Window*)m_window)->ConsumeEvents();
|
((Window*)m_window)->ConsumeEvents();
|
||||||
}
|
}
|
||||||
@@ -1374,7 +1374,7 @@ void App::ScanForTests() {
|
|||||||
for (unsigned int i = 0; i < m_paths.size(); i++) {
|
for (unsigned int i = 0; i < m_paths.size(); i++) {
|
||||||
Module mod;
|
Module mod;
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
std::string::iterator myIter;
|
std::string::iterator myIter;
|
||||||
myIter = m_paths[i].end();
|
myIter = m_paths[i].end();
|
||||||
myIter--;
|
myIter--;
|
||||||
@@ -1382,20 +1382,20 @@ void App::ScanForTests() {
|
|||||||
|
|
||||||
mod.hmodule = LoadLibrary(m_paths[i].c_str());
|
mod.hmodule = LoadLibrary(m_paths[i].c_str());
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
mod.hmodule = dlopen(m_paths[i].c_str(), RTLD_NOW);
|
mod.hmodule = dlopen(m_paths[i].c_str(), RTLD_NOW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mod.hmodule == NULL) {
|
if (mod.hmodule == NULL) {
|
||||||
fprintf(stderr, "Could not load module: %s\n", m_paths[i].c_str());
|
fprintf(stderr, "Could not load module: %s\n", m_paths[i].c_str());
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
fprintf(stderr, "Error : %s\n", dlerror());
|
fprintf(stderr, "Error : %s\n", dlerror());
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
mod.name = m_paths[i];
|
mod.name = m_paths[i];
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
mod.get_count = (TestCountFuncPtr)GetProcAddress(mod.hmodule,
|
mod.get_count = (TestCountFuncPtr)GetProcAddress(mod.hmodule,
|
||||||
"OCLTestList_TestCount");
|
"OCLTestList_TestCount");
|
||||||
mod.get_name =
|
mod.get_name =
|
||||||
@@ -1409,7 +1409,7 @@ void App::ScanForTests() {
|
|||||||
mod.get_libname = (TestLibNameFuncPtr)GetProcAddress(
|
mod.get_libname = (TestLibNameFuncPtr)GetProcAddress(
|
||||||
mod.hmodule, "OCLTestList_TestLibName");
|
mod.hmodule, "OCLTestList_TestLibName");
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
mod.get_count =
|
mod.get_count =
|
||||||
(TestCountFuncPtr)dlsym(mod.hmodule, "OCLTestList_TestCount");
|
(TestCountFuncPtr)dlsym(mod.hmodule, "OCLTestList_TestCount");
|
||||||
mod.get_name =
|
mod.get_name =
|
||||||
@@ -1437,15 +1437,15 @@ void App::CleanUp() {
|
|||||||
if (m_modules[i].cached_test) {
|
if (m_modules[i].cached_test) {
|
||||||
delete[] m_modules[i].cached_test;
|
delete[] m_modules[i].cached_test;
|
||||||
}
|
}
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
FreeLibrary(m_modules[i].hmodule);
|
FreeLibrary(m_modules[i].hmodule);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
dlclose(m_modules[i].hmodule);
|
dlclose(m_modules[i].hmodule);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
if (m_window) delete m_window;
|
if (m_window) delete m_window;
|
||||||
m_window = 0;
|
m_window = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -1461,7 +1461,7 @@ int main(int argc, char** argv) {
|
|||||||
// reset optind as we really didn't parse the full command line
|
// reset optind as we really didn't parse the full command line
|
||||||
optind = 1;
|
optind = 1;
|
||||||
App app(platform);
|
App app(platform);
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
// this function is registers windows service routine when ocltst is launched
|
// this function is registers windows service routine when ocltst is launched
|
||||||
// by the OS on service initialization. On other scenarios, this function does
|
// by the OS on service initialization. On other scenarios, this function does
|
||||||
// nothing.
|
// nothing.
|
||||||
@@ -1469,7 +1469,7 @@ int main(int argc, char** argv) {
|
|||||||
// SetErrorMode(SEM_NOGPFAULTERRORBOX);
|
// SetErrorMode(SEM_NOGPFAULTERRORBOX);
|
||||||
// const LPTOP_LEVEL_EXCEPTION_FILTER oldFilter =
|
// const LPTOP_LEVEL_EXCEPTION_FILTER oldFilter =
|
||||||
// SetUnhandledExceptionFilter(xFilter);
|
// SetUnhandledExceptionFilter(xFilter);
|
||||||
#endif // ATI_OS_WIN
|
#endif // _WIN32
|
||||||
#ifdef AUTO_REGRESS
|
#ifdef AUTO_REGRESS
|
||||||
try {
|
try {
|
||||||
#endif /* AUTO_REGRESS */
|
#endif /* AUTO_REGRESS */
|
||||||
@@ -1490,7 +1490,7 @@ int main(int argc, char** argv) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <dbghelp.h>
|
#include <dbghelp.h>
|
||||||
|
|
||||||
|
|||||||
Sağlanmış
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "pfm.h"
|
#include "pfm.h"
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Sağlanmış
+2
-2
@@ -18,7 +18,7 @@
|
|||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE. */
|
THE SOFTWARE. */
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -172,4 +172,4 @@ void Window::ShowImage(unsigned int width, unsigned int height, float* data) {
|
|||||||
OnPaint();
|
OnPaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ATI_OS_WIN
|
#endif // _WIN32
|
||||||
|
|||||||
Sağlanmış
+2
-2
@@ -21,7 +21,7 @@
|
|||||||
#ifndef _WINDOW_H_
|
#ifndef _WINDOW_H_
|
||||||
#define _WINDOW_H_
|
#define _WINDOW_H_
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <gl\gl.h>
|
#include <gl\gl.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@@ -50,6 +50,6 @@ class Window {
|
|||||||
static unsigned int _h;
|
static unsigned int _h;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ATI_OS_WIN
|
#endif // _WIN32
|
||||||
|
|
||||||
#endif // _WINDOW_H_
|
#endif // _WINDOW_H_
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
//! \file Thread.h
|
//! \file Thread.h
|
||||||
//!
|
//!
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#ifndef _WIN32_WINNT
|
#ifndef _WIN32_WINNT
|
||||||
#define _WIN32_WINNT 0x0501
|
#define _WIN32_WINNT 0x0501
|
||||||
#endif
|
#endif
|
||||||
@@ -86,7 +86,7 @@ class Lock {
|
|||||||
//!
|
//!
|
||||||
|
|
||||||
//! System specific synchronization primitive
|
//! System specific synchronization primitive
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
CRITICAL_SECTION _cs;
|
CRITICAL_SECTION _cs;
|
||||||
#else
|
#else
|
||||||
pthread_mutex_t _lock;
|
pthread_mutex_t _lock;
|
||||||
@@ -131,7 +131,7 @@ class Thread {
|
|||||||
//! Private data members and methods
|
//! Private data members and methods
|
||||||
//!
|
//!
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
//! store the handle
|
//! store the handle
|
||||||
HANDLE _tid;
|
HANDLE _tid;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#ifndef OCLLOG_H_
|
#ifndef OCLLOG_H_
|
||||||
#define OCLLOG_H_
|
#define OCLLOG_H_
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
#ifdef OCLTST_LOG_BUILD
|
#ifdef OCLTST_LOG_BUILD
|
||||||
#define DLLIMPORT __declspec(dllexport)
|
#define DLLIMPORT __declspec(dllexport)
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
#else
|
#else
|
||||||
#define DLLIMPORT
|
#define DLLIMPORT
|
||||||
|
|
||||||
#endif // ATI_OS_WIN
|
#endif // _WIN32
|
||||||
|
|
||||||
enum oclLoggingLevel {
|
enum oclLoggingLevel {
|
||||||
OCLTEST_LOG_ALWAYS,
|
OCLTEST_LOG_ALWAYS,
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
#ifndef _OCLMODULE_H_
|
#ifndef _OCLMODULE_H_
|
||||||
#define _OCLMODULE_H_
|
#define _OCLMODULE_H_
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#define OCLLCONV __cdecl
|
#define OCLLCONV __cdecl
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#define OCLLCONV
|
#define OCLLCONV
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ BaseTestImp::BaseTestImp()
|
|||||||
_platformIndex = 0;
|
_platformIndex = 0;
|
||||||
_perfInfo = 0.0f;
|
_perfInfo = 0.0f;
|
||||||
|
|
||||||
#ifdef ATI_OS_LINUX //
|
#ifdef __linux__ //
|
||||||
_useThreads = 0; // disable threads on linux
|
_useThreads = 0; // disable threads on linux
|
||||||
#else
|
#else
|
||||||
_useThreads = 1; // if available on platform
|
_useThreads = 1; // if available on platform
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ set_target_properties(Common PROPERTIES
|
|||||||
|
|
||||||
target_compile_definitions(Common
|
target_compile_definitions(Common
|
||||||
PUBLIC
|
PUBLIC
|
||||||
ATI_OS_LINUX
|
|
||||||
CL_TARGET_OPENCL_VERSION=220)
|
CL_TARGET_OPENCL_VERSION=220)
|
||||||
|
|
||||||
if(OPENGL_FOUND AND GLEW_FOUND)
|
if(OPENGL_FOUND AND GLEW_FOUND)
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ void OCLTestImp::setOCLWrapper(OCLWrapper* wrapper) { _wrapper = wrapper; }
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
@@ -251,11 +251,11 @@ static int initializeSeed(void) {
|
|||||||
return (int)val;
|
return (int)val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ATI_OS_WIN
|
#endif // _WIN32
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ static int initializeSeed(void) {
|
|||||||
return (int)t.tv_usec;
|
return (int)t.tv_usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // ATI_OS_LINUX
|
#endif // __linux__
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "OCL/Thread.h"
|
#include "OCL/Thread.h"
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ typedef struct __argsToThreadFunc {
|
|||||||
|
|
||||||
} argsToThreadFunc;
|
} argsToThreadFunc;
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
//! Windows thread callback - invokes the callback set by
|
//! Windows thread callback - invokes the callback set by
|
||||||
//! the application in OCLThread constructor
|
//! the application in OCLThread constructor
|
||||||
unsigned _stdcall win32ThreadFunc(void *args) {
|
unsigned _stdcall win32ThreadFunc(void *args) {
|
||||||
@@ -54,7 +54,7 @@ unsigned _stdcall win32ThreadFunc(void *args) {
|
|||||||
//! Constructor for OCLLock
|
//! Constructor for OCLLock
|
||||||
//!
|
//!
|
||||||
OCLutil::Lock::Lock() {
|
OCLutil::Lock::Lock() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
InitializeCriticalSection(&_cs);
|
InitializeCriticalSection(&_cs);
|
||||||
#else
|
#else
|
||||||
pthread_mutex_init(&_lock, NULL);
|
pthread_mutex_init(&_lock, NULL);
|
||||||
@@ -66,7 +66,7 @@ OCLutil::Lock::Lock() {
|
|||||||
//! Destructor for OCLLock
|
//! Destructor for OCLLock
|
||||||
//!
|
//!
|
||||||
OCLutil::Lock::~Lock() {
|
OCLutil::Lock::~Lock() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
DeleteCriticalSection(&_cs);
|
DeleteCriticalSection(&_cs);
|
||||||
#else
|
#else
|
||||||
pthread_mutex_destroy(&_lock);
|
pthread_mutex_destroy(&_lock);
|
||||||
@@ -79,7 +79,7 @@ OCLutil::Lock::~Lock() {
|
|||||||
//! else hold the lock and enter the protected area
|
//! else hold the lock and enter the protected area
|
||||||
//!
|
//!
|
||||||
void OCLutil::Lock::lock() {
|
void OCLutil::Lock::lock() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
EnterCriticalSection(&_cs);
|
EnterCriticalSection(&_cs);
|
||||||
#else
|
#else
|
||||||
pthread_mutex_lock(&_lock);
|
pthread_mutex_lock(&_lock);
|
||||||
@@ -93,7 +93,7 @@ void OCLutil::Lock::lock() {
|
|||||||
//! section as well in this case).
|
//! section as well in this case).
|
||||||
//!
|
//!
|
||||||
bool OCLutil::Lock::tryLock() {
|
bool OCLutil::Lock::tryLock() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
return (TryEnterCriticalSection(&_cs) != 0);
|
return (TryEnterCriticalSection(&_cs) != 0);
|
||||||
#else
|
#else
|
||||||
return !((bool)pthread_mutex_trylock(&_lock));
|
return !((bool)pthread_mutex_trylock(&_lock));
|
||||||
@@ -105,7 +105,7 @@ bool OCLutil::Lock::tryLock() {
|
|||||||
//! Unlock the lock
|
//! Unlock the lock
|
||||||
//!
|
//!
|
||||||
void OCLutil::Lock::unlock() {
|
void OCLutil::Lock::unlock() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
LeaveCriticalSection(&_cs);
|
LeaveCriticalSection(&_cs);
|
||||||
#else
|
#else
|
||||||
pthread_mutex_unlock(&_lock);
|
pthread_mutex_unlock(&_lock);
|
||||||
@@ -117,7 +117,7 @@ void OCLutil::Lock::unlock() {
|
|||||||
//! Constructor for OCLThread
|
//! Constructor for OCLThread
|
||||||
//!
|
//!
|
||||||
OCLutil::Thread::Thread() : _tid(0), _data(0) {
|
OCLutil::Thread::Thread() : _tid(0), _data(0) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
_ID = 0;
|
_ID = 0;
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
@@ -128,7 +128,7 @@ OCLutil::Thread::Thread() : _tid(0), _data(0) {
|
|||||||
//! Destructor for OCLLock
|
//! Destructor for OCLLock
|
||||||
//!
|
//!
|
||||||
OCLutil::Thread::~Thread() {
|
OCLutil::Thread::~Thread() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
CloseHandle(_tid);
|
CloseHandle(_tid);
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
@@ -146,7 +146,7 @@ bool OCLutil::Thread::create(oclThreadFunc func, void *arg) {
|
|||||||
|
|
||||||
bool verbose = getenv("VERBOSE") != NULL;
|
bool verbose = getenv("VERBOSE") != NULL;
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
// Setup the callback struct for thread function and pass to the
|
// Setup the callback struct for thread function and pass to the
|
||||||
// begin thread routine
|
// begin thread routine
|
||||||
// xxx The following struct is allocated but never freed!!!!
|
// xxx The following struct is allocated but never freed!!!!
|
||||||
@@ -180,7 +180,7 @@ bool OCLutil::Thread::create(oclThreadFunc func, void *arg) {
|
|||||||
//! Return the thread ID for the current OCLThread
|
//! Return the thread ID for the current OCLThread
|
||||||
//!
|
//!
|
||||||
unsigned int OCLutil::Thread::getID() {
|
unsigned int OCLutil::Thread::getID() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
return GetCurrentThreadId();
|
return GetCurrentThreadId();
|
||||||
// Type cast the thread handle to unsigned in and send it over
|
// Type cast the thread handle to unsigned in and send it over
|
||||||
#else
|
#else
|
||||||
@@ -193,7 +193,7 @@ unsigned int OCLutil::Thread::getID() {
|
|||||||
//! Wait for this thread to join
|
//! Wait for this thread to join
|
||||||
//!
|
//!
|
||||||
bool OCLutil::Thread::join() {
|
bool OCLutil::Thread::join() {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
DWORD rc = WaitForSingleObject(_tid, INFINITE);
|
DWORD rc = WaitForSingleObject(_tid, INFINITE);
|
||||||
|
|
||||||
if (rc == WAIT_FAILED) {
|
if (rc == WAIT_FAILED) {
|
||||||
|
|||||||
@@ -20,23 +20,23 @@
|
|||||||
|
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#define NANOSECONDS_PER_SEC 1000000000
|
#define NANOSECONDS_PER_SEC 1000000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CPerfCounter::CPerfCounter() : _clocks(0), _start(0) {
|
CPerfCounter::CPerfCounter() : _clocks(0), _start(0) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
QueryPerformanceFrequency((LARGE_INTEGER *)&_freq);
|
QueryPerformanceFrequency((LARGE_INTEGER *)&_freq);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
_freq = NANOSECONDS_PER_SEC;
|
_freq = NANOSECONDS_PER_SEC;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ CPerfCounter::~CPerfCounter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CPerfCounter::Start(void) {
|
void CPerfCounter::Start(void) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
if (_start) {
|
if (_start) {
|
||||||
MessageBox(NULL, "Bad Perf Counter Start", "Error", MB_OK);
|
MessageBox(NULL, "Bad Perf Counter Start", "Error", MB_OK);
|
||||||
@@ -55,7 +55,7 @@ void CPerfCounter::Start(void) {
|
|||||||
QueryPerformanceCounter((LARGE_INTEGER *)&_start);
|
QueryPerformanceCounter((LARGE_INTEGER *)&_start);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
|
|
||||||
struct timespec s;
|
struct timespec s;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &s);
|
clock_gettime(CLOCK_MONOTONIC, &s);
|
||||||
@@ -67,7 +67,7 @@ void CPerfCounter::Start(void) {
|
|||||||
void CPerfCounter::Stop(void) {
|
void CPerfCounter::Stop(void) {
|
||||||
i64 n;
|
i64 n;
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
if (!_start) {
|
if (!_start) {
|
||||||
MessageBox(NULL, "Bad Perf Counter Stop", "Error", MB_OK);
|
MessageBox(NULL, "Bad Perf Counter Stop", "Error", MB_OK);
|
||||||
@@ -77,7 +77,7 @@ void CPerfCounter::Stop(void) {
|
|||||||
QueryPerformanceCounter((LARGE_INTEGER *)&n);
|
QueryPerformanceCounter((LARGE_INTEGER *)&n);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
|
|
||||||
struct timespec s;
|
struct timespec s;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &s);
|
clock_gettime(CLOCK_MONOTONIC, &s);
|
||||||
@@ -91,7 +91,7 @@ void CPerfCounter::Stop(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CPerfCounter::Reset(void) {
|
void CPerfCounter::Reset(void) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
if (_start) {
|
if (_start) {
|
||||||
MessageBox(NULL, "Bad Perf Counter Reset", "Error", MB_OK);
|
MessageBox(NULL, "Bad Perf Counter Reset", "Error", MB_OK);
|
||||||
exit(0);
|
exit(0);
|
||||||
@@ -101,7 +101,7 @@ void CPerfCounter::Reset(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
double CPerfCounter::GetElapsedTime(void) {
|
double CPerfCounter::GetElapsedTime(void) {
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
if (_start) {
|
if (_start) {
|
||||||
MessageBox(NULL, "Trying to get time while still running.", "Error", MB_OK);
|
MessageBox(NULL, "Trying to get time while still running.", "Error", MB_OK);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
#ifndef _TIMER_H_
|
#ifndef _TIMER_H_
|
||||||
#define _TIMER_H_
|
#define _TIMER_H_
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
typedef __int64 i64;
|
typedef __int64 i64;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
typedef long long i64;
|
typedef long long i64;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
//
|
//
|
||||||
// Includes for tests
|
// Includes for tests
|
||||||
//
|
//
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#include "OCLDX11YUY2.h"
|
#include "OCLDX11YUY2.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ static void* dictionary_CreateTestFunc(void) {
|
|||||||
#define TEST(name) \
|
#define TEST(name) \
|
||||||
{ #name, &dictionary_CreateTestFunc < name> }
|
{ #name, &dictionary_CreateTestFunc < name> }
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
|
|
||||||
TestEntry TestList[] = {TEST(OCLDX11YUY2)};
|
TestEntry TestList[] = {TEST(OCLDX11YUY2)};
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,11 @@
|
|||||||
//
|
//
|
||||||
// Testing module (plugin) interface forward declarations
|
// Testing module (plugin) interface forward declarations
|
||||||
//
|
//
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#define OCL_DLLEXPORT __declspec(dllexport)
|
#define OCL_DLLEXPORT __declspec(dllexport)
|
||||||
#define OCL_CALLCONV __cdecl
|
#define OCL_CALLCONV __cdecl
|
||||||
#endif
|
#endif
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#define OCL_DLLEXPORT
|
#define OCL_DLLEXPORT
|
||||||
#define OCL_CALLCONV
|
#define OCL_CALLCONV
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#ifndef _OCL_INCLUDES_H
|
#ifndef _OCL_INCLUDES_H
|
||||||
#define _OCL_INCLUDES_H
|
#define _OCL_INCLUDES_H
|
||||||
|
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
#define POINTER_64 __ptr64
|
#define POINTER_64 __ptr64
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "d3d9.h"
|
#include "d3d9.h"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ void OCLCreateBuffer::run(void) {
|
|||||||
_wrapper->clFinish(cmdQueues_[_deviceId]);
|
_wrapper->clFinish(cmdQueues_[_deviceId]);
|
||||||
|
|
||||||
size_t maxSteps = maxSize_;
|
size_t maxSteps = maxSize_;
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
long pages = sysconf(_SC_PHYS_PAGES);
|
long pages = sysconf(_SC_PHYS_PAGES);
|
||||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||||
if (maxSteps > (size_t)(pages * page_size / 2)) {
|
if (maxSteps > (size_t)(pages * page_size / 2)) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -194,7 +194,7 @@ void OCLCreateImage::open(unsigned int test, char *units, double &conversion,
|
|||||||
if (ImageSizeY >= max2DHeight) {
|
if (ImageSizeY >= max2DHeight) {
|
||||||
ImageSizeY = max2DHeight - 0x1000;
|
ImageSizeY = max2DHeight - 0x1000;
|
||||||
}
|
}
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
// On linux, if the size of total system memory is less than 4GB,
|
// On linux, if the size of total system memory is less than 4GB,
|
||||||
// then, we can allocate much smaller image.
|
// then, we can allocate much smaller image.
|
||||||
// TODO, need to find the root cause
|
// TODO, need to find the root cause
|
||||||
@@ -289,7 +289,7 @@ void OCLCreateImage::open(unsigned int test, char *units, double &conversion,
|
|||||||
float *data;
|
float *data;
|
||||||
size_t ActualImageSizeY = ImageSizeY;
|
size_t ActualImageSizeY = ImageSizeY;
|
||||||
size_t maxImageSize = maxSize_;
|
size_t maxImageSize = maxSize_;
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
long pages = sysconf(_SC_PHYS_PAGES);
|
long pages = sysconf(_SC_PHYS_PAGES);
|
||||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||||
if (maxImageSize > ((size_t)pages * 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 ActualImageSizeZ = ImageSizeZ;
|
||||||
size_t maxImageSize = maxSize_;
|
size_t maxImageSize = maxSize_;
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
long pages = sysconf(_SC_PHYS_PAGES);
|
long pages = sysconf(_SC_PHYS_PAGES);
|
||||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||||
if (maxImageSize > ((size_t)pages * page_size)) {
|
if (maxImageSize > ((size_t)pages * page_size)) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include "CL/cl.h"
|
#include "CL/cl.h"
|
||||||
#include "CL/cl_ext.h"
|
#include "CL/cl_ext.h"
|
||||||
|
|
||||||
#if !defined(ATI_OS_LINUX)
|
#if !defined(__linux__)
|
||||||
#include "WinBase.h"
|
#include "WinBase.h"
|
||||||
typedef DWORD(WINAPI* GetThreadId)(__in HANDLE Thread);
|
typedef DWORD(WINAPI* GetThreadId)(__in HANDLE Thread);
|
||||||
#endif
|
#endif
|
||||||
@@ -63,7 +63,7 @@ void OCLGetQueueThreadID::open(unsigned int test, char* units,
|
|||||||
static void CL_CALLBACK notify_callback(cl_event event,
|
static void CL_CALLBACK notify_callback(cl_event event,
|
||||||
cl_int event_command_exec_status,
|
cl_int event_command_exec_status,
|
||||||
void* user_data) {
|
void* user_data) {
|
||||||
#if defined(ATI_OS_LINUX)
|
#if defined(__linux__)
|
||||||
pthread_t id = (pthread_t)user_data;
|
pthread_t id = (pthread_t)user_data;
|
||||||
pthread_t handle = pthread_self();
|
pthread_t handle = pthread_self();
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifdef ATI_OS_LINUX
|
#ifdef __linux__
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ void OCLStablePState::run(void) {
|
|||||||
cl_set_device_clock_mode_output_amd setClockModeOutput = {};
|
cl_set_device_clock_mode_output_amd setClockModeOutput = {};
|
||||||
error_ = _wrapper->clSetDeviceClockModeAMD(gpu_device, setClockModeInput,
|
error_ = _wrapper->clSetDeviceClockModeAMD(gpu_device, setClockModeInput,
|
||||||
&setClockModeOutput);
|
&setClockModeOutput);
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
CHECK_RESULT(error_ != CL_SUCCESS, "SetClockMode profiling failed\n");
|
CHECK_RESULT(error_ != CL_SUCCESS, "SetClockMode profiling failed\n");
|
||||||
#else
|
#else
|
||||||
error_ = CL_SUCCESS;
|
error_ = CL_SUCCESS;
|
||||||
@@ -119,7 +119,7 @@ void OCLStablePState::run(void) {
|
|||||||
setClockModeOutput = {};
|
setClockModeOutput = {};
|
||||||
error_ = _wrapper->clSetDeviceClockModeAMD(gpu_device, setClockModeInput,
|
error_ = _wrapper->clSetDeviceClockModeAMD(gpu_device, setClockModeInput,
|
||||||
&setClockModeOutput);
|
&setClockModeOutput);
|
||||||
#ifdef ATI_OS_WIN
|
#ifdef _WIN32
|
||||||
CHECK_RESULT(error_ != CL_SUCCESS, "SetClockMode default failed\n");
|
CHECK_RESULT(error_ != CL_SUCCESS, "SetClockMode default failed\n");
|
||||||
#else
|
#else
|
||||||
error_ = CL_SUCCESS;
|
error_ = CL_SUCCESS;
|
||||||
|
|||||||
@@ -4377,7 +4377,7 @@ vdiAgent_OnLoad(vdi_agent * agent)
|
|||||||
std::string clTraceLogStr = clTraceLogEnv;
|
std::string clTraceLogStr = clTraceLogEnv;
|
||||||
const std::size_t pidPos = clTraceLogStr.find("%pid%");
|
const std::size_t pidPos = clTraceLogStr.find("%pid%");
|
||||||
if (pidPos != std::string::npos) {
|
if (pidPos != std::string::npos) {
|
||||||
#if defined(ATI_OS_WIN)
|
#if defined(_WIN32)
|
||||||
const std::int32_t pid = _getpid();
|
const std::int32_t pid = _getpid();
|
||||||
#else
|
#else
|
||||||
const std::int32_t pid = getpid();
|
const std::int32_t pid = getpid();
|
||||||
|
|||||||
Yeni konuda referans
Bir kullanıcı engelle