[ocl-icd] 01/13: New upstream version 2.2.10

Vincent Danjean vdanjean at debian.org
Wed Nov 29 09:16:51 UTC 2017


This is an automated email from the git hooks/post-receive script.

vdanjean pushed a commit to branch master
in repository ocl-icd.

commit 20dd9b6a1430a054b0ded4b05da32120e080156f
Author: Vincent Danjean <Vincent.Danjean at ens-lyon.org>
Date:   Sat Dec 3 20:16:16 2016 +0100

    New upstream version 2.2.10
---
 NEWS             | 17 ++++++++++++++++-
 configure        | 20 ++++++++++----------
 configure.ac     |  2 +-
 ocl_icd_debug.h  |  6 +++---
 ocl_icd_loader.c | 41 +++++++++++++++++++++++++++++++----------
 tests/package.m4 |  4 ++--
 tests/testsuite  | 20 ++++++++++----------
 7 files changed, 73 insertions(+), 37 deletions(-)

diff --git a/NEWS b/NEWS
index afba639..139c60b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,20 @@
 
-Version 2.2.8
+Version 2.2.10
+==============
+Giuseppe Bilotta (2):
+      Suppress warning due to shadowed variable name
+      Static-const-ify ICD loader info strings
+
+Martin Kelly (2):
+      Typo fix
+      Fallback to dispatch table for clGetPlatformInfo
+
+Vincent Danjean (3):
+      Merge pull request #2 from surround-io/master
+      By default, use platforme specific clGetPlatformInfo
+      Release 2.2.10
+
+Version 2.2.9
 =============
 Brice Videau (1):
       Update clGetICDLoaderInfoOCLICD to report version 2.1.
diff --git a/configure b/configure
index 00cc2d9..6855bf5 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for OpenCL ICD Loader 2.2.9.
+# Generated by GNU Autoconf 2.69 for OpenCL ICD Loader 2.2.10.
 #
 # Report bugs to <ocl-icd-devel at lists.forge.imag.fr>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='OpenCL ICD Loader'
 PACKAGE_TARNAME='ocl-icd'
-PACKAGE_VERSION='2.2.9'
-PACKAGE_STRING='OpenCL ICD Loader 2.2.9'
+PACKAGE_VERSION='2.2.10'
+PACKAGE_STRING='OpenCL ICD Loader 2.2.10'
 PACKAGE_BUGREPORT='ocl-icd-devel at lists.forge.imag.fr'
 PACKAGE_URL=''
 
@@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures OpenCL ICD Loader 2.2.9 to adapt to many kinds of systems.
+\`configure' configures OpenCL ICD Loader 2.2.10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1412,7 +1412,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of OpenCL ICD Loader 2.2.9:";;
+     short | recursive ) echo "Configuration of OpenCL ICD Loader 2.2.10:";;
    esac
   cat <<\_ACEOF
 
@@ -1529,7 +1529,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-OpenCL ICD Loader configure 2.2.9
+OpenCL ICD Loader configure 2.2.10
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by OpenCL ICD Loader $as_me 2.2.9, which was
+It was created by OpenCL ICD Loader $as_me 2.2.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2819,7 +2819,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ocl-icd'
- VERSION='2.2.9'
+ VERSION='2.2.10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -13571,7 +13571,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by OpenCL ICD Loader $as_me 2.2.9, which was
+This file was extended by OpenCL ICD Loader $as_me 2.2.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13637,7 +13637,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-OpenCL ICD Loader config.status 2.2.9
+OpenCL ICD Loader config.status 2.2.10
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 264d6e0..1f8df37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@
 
 
 AC_PREREQ([2.67])
-AC_INIT([OpenCL ICD Loader], [2.2.9], [ocl-icd-devel at lists.forge.imag.fr], [ocl-icd])
+AC_INIT([OpenCL ICD Loader], [2.2.10], [ocl-icd-devel at lists.forge.imag.fr], [ocl-icd])
 AC_CONFIG_SRCDIR([ocl_icd_loader.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_HEADERS([config.h])
diff --git a/ocl_icd_debug.h b/ocl_icd_debug.h
index 34b8154..2f29355 100644
--- a/ocl_icd_debug.h
+++ b/ocl_icd_debug.h
@@ -61,9 +61,9 @@ extern int debug_ocl_icd_mask;
 	return ret; \
    } while(0)
 #  define RETURN_STR(val) do { \
-	char* ret=(char*)(val);			\
-	debug(D_TRACE, "return: %s", ret);	\
-	return ret; \
+	char* _ret=(char*)(val);		\
+	debug(D_TRACE, "return: %s", _ret);	\
+	return _ret; \
    } while(0)
 #  ifdef DEBUG_OCL_ICD_PROVIDE_DUMP_FIELD
 #    pragma GCC diagnostic push
diff --git a/ocl_icd_loader.c b/ocl_icd_loader.c
index e42ed3f..831f2a7 100644
--- a/ocl_icd_loader.c
+++ b/ocl_icd_loader.c
@@ -395,14 +395,14 @@ static inline void _find_and_check_platforms(cl_uint num_icds) {
     picd->ext_fn_ptr = _get_function_addr(dlh, NULL, "clGetExtensionFunctionAddress");
     clIcdGetPlatformIDsKHR_fn plt_fn_ptr =
       _get_function_addr(dlh, picd->ext_fn_ptr, "clIcdGetPlatformIDsKHR");
-    clGetPlatformInfo_fn plt_info_ptr =
-      _get_function_addr(dlh, picd->ext_fn_ptr,	"clGetPlatformInfo");
     if( picd->ext_fn_ptr == NULL
-	|| plt_fn_ptr == NULL
-	|| plt_info_ptr == NULL) {
+       || plt_fn_ptr == NULL) {
       debug(D_WARN, "Missing symbols in ICD, skipping it");
       continue;
     }
+    int plt_info_global_ptr_queried = 0;
+    clGetPlatformInfo_fn plt_info_global_ptr = NULL;
+      _get_function_addr(dlh, picd->ext_fn_ptr,	"clGetPlatformInfo");
     cl_uint num_platforms=0;
     cl_int error;
     error = (*plt_fn_ptr)(0, NULL, &num_platforms);
@@ -422,7 +422,7 @@ static inline void _find_and_check_platforms(cl_uint num_icds) {
     debug(D_LOG, "Try to load %d platforms", num_platforms);
     if (_allocate_platforms(num_platforms) < num_platforms) {
       free(platforms);
-      debug(D_WARN, "Not enought platform allocated. Skipping ICD");
+      debug(D_WARN, "Not enough platform allocated. Skipping ICD");
       continue;
     }
     for(j=0; j<num_platforms; j++) {
@@ -432,6 +432,27 @@ static inline void _find_and_check_platforms(cl_uint num_icds) {
       p->extension_suffix=NULL;
       p->vicd=&_icds[i];
       p->pid=platforms[j];
+
+      /* By default, we try to use the plateform-specific
+       * clGetPlatformInfo (from the dispatch table).
+       * If missing, we fail back on the global one (if any)
+       */
+      clGetPlatformInfo_fn plt_info_ptr = p->pid->dispatch->clGetPlatformInfo;
+
+      if (plt_info_ptr == NULL) {
+        if (! plt_info_global_ptr_queried) {
+          plt_info_global_ptr =
+            _get_function_addr(dlh, picd->ext_fn_ptr, "clGetPlatformInfo");
+            plt_info_global_ptr_queried = 1;
+        }
+        if (plt_info_global_ptr) {
+          plt_info_ptr = plt_info_global_ptr;
+        } else {
+          debug(D_WARN, "Missing clGetPlatformInfo in ICD, skipping it");
+          continue;
+        }
+      }
+
 #ifdef DEBUG_OCL_ICD
       if (debug_ocl_icd_mask & D_DUMP) {
         int log=debug_ocl_icd_mask & D_TRACE;
@@ -705,13 +726,13 @@ static cl_int clGetICDLoaderInfoOCLICD(
   void *           param_value,
   size_t *         param_value_size_ret)
 {
-  char cl_icdl_ocl_version[] = "OpenCL " OCL_ICD_OPENCL_VERSION;
-  char cl_icdl_version[] = PACKAGE_VERSION;
-  char cl_icdl_name[] = PACKAGE_NAME;
-  char cl_icdl_vendor[] = "OCL Icd free software";
+  static const char cl_icdl_ocl_version[] = "OpenCL " OCL_ICD_OPENCL_VERSION;
+  static const char cl_icdl_version[] = PACKAGE_VERSION;
+  static const char cl_icdl_name[] = PACKAGE_NAME;
+  static const char cl_icdl_vendor[] = "OCL Icd free software";
 
   size_t size_string;
-  char * string_p;
+  const char * string_p;
 #define oclcase(name, NAME) \
   case CL_ICDL_##NAME: \
     string_p = cl_icdl_##name; \
diff --git a/tests/package.m4 b/tests/package.m4
index d97368f..8ca77d3 100644
--- a/tests/package.m4
+++ b/tests/package.m4
@@ -4,9 +4,9 @@ m4_define([AT_PACKAGE_NAME],
 m4_define([AT_PACKAGE_TARNAME],
   [ocl-icd])
 m4_define([AT_PACKAGE_VERSION],
-  [2.2.9])
+  [2.2.10])
 m4_define([AT_PACKAGE_STRING],
-  [OpenCL ICD Loader 2.2.9])
+  [OpenCL ICD Loader 2.2.10])
 m4_define([AT_PACKAGE_BUGREPORT],
   [ocl-icd-devel at lists.forge.imag.fr])
 m4_define([AT_PACKAGE_URL],
diff --git a/tests/testsuite b/tests/testsuite
index 386ba7e..c168e72 100755
--- a/tests/testsuite
+++ b/tests/testsuite
@@ -931,7 +931,7 @@ fi
 # List of tests.
 if $at_list_p; then
   cat <<_ATEOF || at_write_fail=1
-OpenCL ICD Loader 2.2.9 test suite test groups:
+OpenCL ICD Loader 2.2.10 test suite test groups:
 
  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
       KEYWORDS
@@ -972,7 +972,7 @@ _ATEOF
   exit $at_write_fail
 fi
 if $at_version_p; then
-  $as_echo "$as_me (OpenCL ICD Loader 2.2.9)" &&
+  $as_echo "$as_me (OpenCL ICD Loader 2.2.10)" &&
   cat <<\_ATEOF || at_write_fail=1
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1157,13 +1157,13 @@ fi
 exec 5>>"$at_suite_log"
 
 # Banners and logs.
-$as_echo "## ----------------------------------- ##
-## OpenCL ICD Loader 2.2.9 test suite. ##
-## ----------------------------------- ##"
+$as_echo "## ------------------------------------ ##
+## OpenCL ICD Loader 2.2.10 test suite. ##
+## ------------------------------------ ##"
 {
-  $as_echo "## ----------------------------------- ##
-## OpenCL ICD Loader 2.2.9 test suite. ##
-## ----------------------------------- ##"
+  $as_echo "## ------------------------------------ ##
+## OpenCL ICD Loader 2.2.10 test suite. ##
+## ------------------------------------ ##"
   echo
 
   $as_echo "$as_me: command line was:"
@@ -2006,7 +2006,7 @@ _ASBOX
   $as_echo "Please send $at_msg and all information you think might help:
 
    To: <ocl-icd-devel at lists.forge.imag.fr>
-   Subject: [OpenCL ICD Loader 2.2.9] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
+   Subject: [OpenCL ICD Loader 2.2.10] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
 
 You may investigate any problem if you feel able to do so, in which
 case the test suite provides a good starting point.  Its output may
@@ -2755,7 +2755,7 @@ at_status=$? at_failed=false
 $at_check_filter
 at_fn_diff_devnull "$at_stderr" || at_failed=:
 echo >>"$at_stdout"; $as_echo "ocl_version: OpenCL 2.1
-version: 2.2.9
+version: 2.2.10
 name: OpenCL ICD Loader
 vendor: OCL Icd free software
 " | \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/ocl-icd.git



More information about the Pkg-opencl-commits mailing list