starpu_fpga.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2019-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. #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. max_file_t *file; /**< Provide the file to be loaded */
  41. const char *engine_id_pattern; /**< Provide the engine(s) on which to be loaded, following
  42. the Maxeler engine naming, i.e. typically
  43. "local:0", "local:1", etc.
  44. In an array of struct starpu_max_load, only one can have
  45. the "*" specification. */
  46. };
  47. void starpu_fpga_report_configuration(void);
  48. /**
  49. set fpga device
  50. */
  51. int starpu_fpga_set_device(unsigned devid);
  52. /**
  53. fpga is silent
  54. */
  55. int starpu_fpga_is_silent();
  56. /**
  57. Maxeler engine of the current worker
  58. */
  59. max_engine_t *starpu_fpga_get_local_engine(void);
  60. /** @} */
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64. #endif /* STARPU_USE_FPGA */
  65. #endif /* __STARPU_FPGA_H__ */