driver_opencl_init.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #include <core/workers.h>
  17. #include <drivers/opencl/driver_opencl.h>
  18. static struct starpu_driver_info driver_info =
  19. {
  20. .name_upper = "OpenCL",
  21. .name_var = "OPENCL",
  22. .name_lower = "opencl",
  23. .memory_kind = STARPU_OPENCL_RAM,
  24. .alpha = 12.22f,
  25. };
  26. static struct starpu_memory_driver_info memory_driver_info =
  27. {
  28. .name_upper = "OpenCL",
  29. .worker_archtype = STARPU_OPENCL_WORKER,
  30. };
  31. void _starpu_opencl_preinit(void)
  32. {
  33. starpu_driver_info_register(STARPU_OPENCL_WORKER, &driver_info);
  34. starpu_memory_driver_info_register(STARPU_OPENCL_RAM, &memory_driver_info);
  35. }