starpu_fpga.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2019-2021 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. #ifndef __STARPU_FPGA_H__
  17. #define __STARPU_FPGA_H__
  18. #include <starpu_config.h>
  19. #if defined STARPU_USE_FPGA
  20. //#include <fpga.h>
  21. #include <MaxSLiCInterface.h>
  22. #ifdef __cplusplus
  23. extern "C"
  24. {
  25. #endif
  26. /**
  27. @defgroup API_FPGA_Extensions FPGA Extensions
  28. @{
  29. */
  30. //int starpu_fpga_allocate_memory(fpga_mem *addr, size_t size);
  31. struct starpu_fpga_data_trans
  32. {
  33. int size;
  34. float time;
  35. };
  36. /**
  37. This specifies a Maxeler file to be loaded on some engines.
  38. */
  39. struct starpu_max_load
  40. {
  41. max_file_t *file; /**< Provide the file to be loaded */
  42. const char *engine_id_pattern; /**< Provide the engine(s) on which to be loaded, following
  43. the Maxeler engine naming, i.e. typically
  44. "*:0", "*:1", etc.
  45. In an array of struct starpu_max_load, only one can have
  46. the "*" specification. */
  47. };
  48. void starpu_fpga_report_configuration(void);
  49. /**
  50. set fpga device
  51. */
  52. int starpu_fpga_set_device(unsigned devid);
  53. /**
  54. fpga is silent
  55. */
  56. int starpu_fpga_is_silent();
  57. /**
  58. Maxeler engine of the current worker
  59. */
  60. max_engine_t *starpu_fpga_get_local_engine(void);
  61. /** @} */
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65. #endif /* STARPU_USE_FPGA */
  66. #endif /* __STARPU_FPGA_H__ */