mod_interface.f90 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ! StarPU --- Runtime system for heterogeneous multicore architectures.
  2. !
  3. ! Copyright (C) 2015-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. ! Copyright (C) 2015 ONERA
  5. !
  6. ! StarPU is free software; you can redistribute it and/or modify
  7. ! it under the terms of the GNU Lesser General Public License as published by
  8. ! the Free Software Foundation; either version 2.1 of the License, or (at
  9. ! your option) any later version.
  10. !
  11. ! StarPU is distributed in the hope that it will be useful, but
  12. ! WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. !
  15. ! See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. !
  17. ! Fortran module interface for StarPU initialization and element registration
  18. MODULE mod_interface
  19. INTERFACE
  20. FUNCTION starpu_my_init_c() BIND(C)
  21. USE iso_c_binding
  22. INTEGER(KIND=C_INT) :: starpu_my_init_c
  23. END FUNCTION starpu_my_init_c
  24. END INTERFACE
  25. INTERFACE
  26. SUBROUTINE starpu_register_element_c(Neq,Np,Ng,ro,dro,basis,ro_h,dro_h,basis_h) BIND(C)
  27. USE iso_c_binding
  28. INTEGER(KIND=C_INT),VALUE :: Neq,Np,Ng
  29. REAL(KIND=C_DOUBLE),DIMENSION(Neq,Np) :: ro,dro
  30. REAL(KIND=C_DOUBLE),DIMENSION(Np,Ng) :: basis
  31. TYPE(C_PTR), INTENT(OUT) :: ro_h, dro_h, basis_h
  32. END SUBROUTINE starpu_register_element_c
  33. END INTERFACE
  34. INTERFACE
  35. SUBROUTINE starpu_unregister_element_c( &
  36. ro_h,dro_h,basis_h) BIND(C)
  37. USE iso_c_binding
  38. TYPE(C_PTR), INTENT(IN) :: ro_h, dro_h, basis_h
  39. END SUBROUTINE starpu_unregister_element_c
  40. END INTERFACE
  41. INTERFACE
  42. SUBROUTINE starpu_loop_element_task_c(coeff, &
  43. ro_h,dro_h,basis_h) BIND(C)
  44. USE iso_c_binding
  45. REAL(KIND=C_DOUBLE),VALUE :: coeff
  46. TYPE(C_PTR), INTENT(IN) :: ro_h, dro_h, basis_h
  47. END SUBROUTINE starpu_loop_element_task_c
  48. END INTERFACE
  49. INTERFACE
  50. SUBROUTINE starpu_copy_element_task_c( &
  51. ro_h,dro_h) BIND(C)
  52. USE iso_c_binding
  53. TYPE(C_PTR), INTENT(IN) :: ro_h, dro_h
  54. END SUBROUTINE starpu_copy_element_task_c
  55. END INTERFACE
  56. END MODULE mod_interface