소스 검색

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;
 }