Browse Source

SOCL: Force constant alignment

Sylvain Henry 13 years ago
parent
commit
9f02e9d0db
2 changed files with 8 additions and 8 deletions
  1. 2 2
      socl/src/devices.c
  2. 6 6
      socl/src/socl.c

+ 2 - 2
socl/src/devices.c

@@ -18,9 +18,9 @@
 #include "devices.h"
 
 // OpenCL 1.0 : Mandatory format: major_number.minor_number
-const char * SOCL_DRIVER_VERSION = "0.1";
+const char * __attribute__ ((aligned (16))) SOCL_DRIVER_VERSION = "0.1";
 
-const cl_uint SOCL_DEVICE_VENDOR_ID = 666;
+const cl_uint __attribute__ ((aligned (16))) SOCL_DEVICE_VENDOR_ID = 666;
 
 const struct _cl_device_id socl_devices[] = {
    { 

+ 6 - 6
socl/src/socl.c

@@ -18,15 +18,15 @@
 
 struct _cl_platform_id socl_platform = {};
 
-const char * SOCL_PROFILE = "FULL_PROFILE";
-const char * SOCL_VERSION = "OpenCL 1.0 StarPU Edition (0.0.1)";
-const char * SOCL_PLATFORM_NAME    = "StarPU Platform";
-const char * SOCL_VENDOR  = "INRIA";
-const char * SOCL_PLATFORM_EXTENSIONS = "";
+const char * __attribute__ ((aligned (16))) SOCL_PROFILE = "FULL_PROFILE" ;
+const char * __attribute__ ((aligned (16))) SOCL_VERSION = "OpenCL 1.0 StarPU Edition (0.0.1)";
+const char * __attribute__ ((aligned (16))) SOCL_PLATFORM_NAME    = "StarPU Platform";
+const char * __attribute__ ((aligned (16))) SOCL_VENDOR  = "INRIA";
+const char * __attribute__ ((aligned (16))) SOCL_PLATFORM_EXTENSIONS = "";
 
 
 /* Command queues with profiling enabled
  * This allows us to disable StarPU profiling it
  * is equal to 0
  */
-int profiling_queue_count = 0;
+int __attribute__ ((aligned (16))) profiling_queue_count = 0;