#
FIND_PATH(DRM_INCLUDE_PATH drm.h
+ ~/include/libdrm/
/usr/include/libdrm/
/usr/local/include/libdrm/
/sw/include/libdrm/
FIND_LIBRARY(DRM_LIBRARY
NAMES DRM drm
PATHS
+ ~/lib/
/usr/lib64
/usr/lib
/usr/local/lib64
FIND_LIBRARY(DRM_INTEL_LIBRARY
NAMES DRM_INTEL drm_intel
PATHS
+ ~/lib/
/usr/lib64
/usr/lib
/usr/local/lib64
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
SET(CMAKE_VERBOSE_MAKEFILE "false")
-SET(CMAKE_BUILD_TYPE "NOOPT" CACHE STRING "Build type")
+SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type")
SET(USE_INTEL_COMPILER CACHE BOOL "false")
SET(USE_FULSIM CACHE BOOL "false")
ADD_DEFINITIONS(-D__$(USER)__)
ELSE (USE_FULSIM)
ADD_DEFINITIONS(-DUSE_FULSIM=0)
ENDIF (USE_FULSIM)
-
-SET(SSE "-mssse3")
-SET(CMAKE_CXX_FLAGS "-Wall -Wno-invalid-offsetof -mfpmath=sse ${SSE} --no-exceptions --no-rtti -Wcast-align -std=c++0x")
-SET(CMAKE_CXX_FLAGS_NOOPT "-g -DNOOPT")
-SET(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -pg -DDEBUG")
-SET(CMAKE_CXX_FLAGS_RELEASE "-g -O3 -DNDEBUG")
-SET(CMAKE_C_FLAGS "-Wall -mfpmath=sse -msse -msse2 ${SSE4} --no-exceptions -Wcast-align")
-SET(CMAKE_C_FLAGS_NOOPT "-g -DNOOPT")
-SET(CMAKE_C_FLAGS_DEBUG "-g -O2 -pg -DDEBUG")
-SET(CMAKE_C_FLAGS_RELEASE "-O3 -g -DNDEBUG")
-SET(OCL_CMAKE_DIR "${OCL_SOURCE_DIR}/CMake")
-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OCL_CMAKE_DIR}")
+SET(CMAKE_CXX_FLAGS "-Wall -Wno-invalid-offsetof -mfpmath=sse --no-exceptions --no-rtti -Wcast-align -std=c++0x")
+SET(CMAKE_C_FLAGS "-Wall -mfpmath=sse -msse2 -Wcast-align")
# XLib
INCLUDE(CMake/FindXLib.cmake)
CHECK_CONTEXT (context);
cl_context_delete(context);
error:
- return CL_SUCCESS;
+ return err;
}
cl_int
CHECK_CONTEXT (context);
queue = cl_context_create_queue(context, device, properties, errcode_ret);
error:
- return queue;
+ return err == CL_SUCCESS ? queue : NULL;
}
cl_int
const void * buffer_create_info,
cl_int * errcode_ret)
{
+#if 0
cl_int err = CL_SUCCESS;
CHECK_MEM (buffer);
NOT_IMPLEMENTED;
error:
+#endif
return NULL;
}
void * user_data,
cl_int * errcode_ret)
{
- cl_platform_id platform = NULL;
+ /* cl_platform_id platform = NULL; */
cl_context ctx = NULL;
cl_int err = CL_SUCCESS;
/* Check that we are getting the right platform */
if (UNLIKELY((err = cl_context_properties_is_ok(properties)) != CL_SUCCESS))
goto error;
- platform = intel_platform;
+ /* platform = intel_platform; */
/* Now check if the user is asking for the right device */
if (UNLIKELY(cl_device_id_is_ok(*devices) == CL_FALSE)) {
cl_context_new(void)
{
cl_context ctx = NULL;
- int err = 0;
- TRY_ALLOC (ctx, CALLOC(struct _cl_context));
- TRY_ALLOC (ctx->intel_drv, cl_genx_driver_new());
+ TRY_ALLOC_NO_ERR (ctx, CALLOC(struct _cl_context));
+ TRY_ALLOC_NO_ERR (ctx->intel_drv, cl_genx_driver_new());
ctx->magic = CL_MAGIC_CONTEXT_HEADER;
ctx->ref_n = 1;
pthread_mutex_init(&ctx->program_lock, NULL);