ソースを参照

SOCL: use clShutdown in "basic" example (require OpenCL 1.2 headers)

Sylvain Henry 12 年 前
コミット
d6faffdf88
共有1 個のファイルを変更した8 個の追加0 個の削除を含む
  1. 8 0
      socl/examples/basic/basic.c

+ 8 - 0
socl/examples/basic/basic.c

@@ -234,5 +234,13 @@ int main(int UNUSED(argc), char** UNUSED(argv)) {
    err = clReleaseContext(context);
    check(err, "clReleaseContext");
 
+
+   void (*clShutdown)(void) = clGetExtensionFunctionAddressForPlatform(platforms[platform_idx], "clShutdown");
+
+   if (clShutdown != NULL) {
+	   printf("Calling clShutdown :)\n");
+	   clShutdown();
+   }
+
    return 0;
 }