Browse Source

examples/binary/binary.c: call starpu_opencl_unload_opencl()

Nathalie Furmento 9 years ago
parent
commit
865ea92676
1 changed files with 5 additions and 1 deletions
  1. 5 1
      examples/binary/binary.c

+ 5 - 1
examples/binary/binary.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2011, 2013-2015  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013, 2014  CNRS
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2016  CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -89,6 +89,10 @@ int compute(char *file_name, int load_as_file)
 	/* update the array in RAM */
 	starpu_data_unregister(float_array_handle);
 
+#ifdef STARPU_USE_OPENCL
+	starpu_opencl_unload_opencl(&opencl_program);
+#endif
+
 	FPRINTF(stderr, "array -> %f, %f, %f, %f\n", float_array[0], float_array[1], float_array[2], float_array[3]);
 
 	if (float_array[0] != niter || float_array[0] != float_array[1] + float_array[2] + float_array[3])