boinc_opencl.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // This file is part of BOINC.
  2. // http://boinc.berkeley.edu
  3. // Copyright (C) 2011 University of California
  4. //
  5. // BOINC is free software; you can redistribute it and/or modify it
  6. // under the terms of the GNU Lesser General Public License
  7. // as published by the Free Software Foundation,
  8. // either version 3 of the License, or (at your option) any later version.
  9. //
  10. // BOINC is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. // See the GNU Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with BOINC. If not, see <http://www.gnu.org/licenses/>.
  17. // BOINC API for OpenCL apps
  18. // Get the cl_device_id and cl_platform_id for the OpenCL GPU
  19. // assigned to your job.
  20. //
  21. // NOTE: Compile and link this function with your application;
  22. // it is not included in the standard BOINC libraries.
  23. #include "cl_boinc.h"
  24. int boinc_get_opencl_ids(
  25. int argc, char** argv, int type,
  26. cl_device_id* device, cl_platform_id* platform
  27. );
  28. // doesn't work w/ pre-7 clients; use the above
  29. //
  30. int boinc_get_opencl_ids(cl_device_id* device, cl_platform_id* platform);