Browse Source

examples/cpp/incrementer_cpp.cpp: unload the opencl program before shutting down.

Cyril Roelandt 13 years ago
parent
commit
1addb07bf4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      examples/cpp/incrementer_cpp.cpp

+ 4 - 0
examples/cpp/incrementer_cpp.cpp

@@ -95,6 +95,10 @@ int main(int argc, char **argv)
 		ret = 1;
 	}
 
+#ifdef STARPU_USE_OPENCL
+	ret = starpu_opencl_unload_opencl(&opencl_program);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_opencl_unload_opencl");
+#endif
 	starpu_shutdown();
 
 	return ret;