mod_interface.f90 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ! StarPU --- Runtime system for heterogeneous multicore architectures.
  2. !
  3. ! Copyright (C) 2015 ONERA
  4. ! Copyright (C) 2015 Inria
  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. ! Fortran module interface for StarPU initialization and element registration
  17. MODULE mod_interface
  18. INTERFACE
  19. FUNCTION starpu_my_init_c() BIND(C)
  20. USE iso_c_binding
  21. INTEGER(KIND=C_INT) :: starpu_my_init_c
  22. END FUNCTION starpu_my_init_c
  23. END INTERFACE
  24. INTERFACE
  25. SUBROUTINE starpu_register_element_c(Neq,Np,Ng,ro,dro,basis,ro_h,dro_h,basis_h) BIND(C)
  26. USE iso_c_binding
  27. INTEGER(KIND=C_INT),VALUE :: Neq,Np,Ng
  28. REAL(KIND=C_DOUBLE),DIMENSION(Neq,Np) :: ro,dro
  29. REAL(KIND=C_DOUBLE),DIMENSION(Np,Ng) :: basis
  30. TYPE(C_PTR), INTENT(OUT) :: ro_h, dro_h, basis_h
  31. END SUBROUTINE starpu_register_element_c
  32. END INTERFACE
  33. INTERFACE
  34. SUBROUTINE starpu_unregister_element_c( &
  35. ro_h,dro_h,basis_h) BIND(C)
  36. USE iso_c_binding
  37. TYPE(C_PTR), INTENT(IN) :: ro_h, dro_h, basis_h
  38. END SUBROUTINE starpu_unregister_element_c
  39. END INTERFACE
  40. INTERFACE
  41. SUBROUTINE starpu_loop_element_task_c(coeff, &
  42. ro_h,dro_h,basis_h) BIND(C)
  43. USE iso_c_binding
  44. REAL(KIND=C_DOUBLE),VALUE :: coeff
  45. TYPE(C_PTR), INTENT(IN) :: ro_h, dro_h, basis_h
  46. END SUBROUTINE starpu_loop_element_task_c
  47. END INTERFACE
  48. INTERFACE
  49. SUBROUTINE starpu_copy_element_task_c( &
  50. ro_h,dro_h) BIND(C)
  51. USE iso_c_binding
  52. TYPE(C_PTR), INTENT(IN) :: ro_h, dro_h
  53. END SUBROUTINE starpu_copy_element_task_c
  54. END INTERFACE
  55. END MODULE mod_interface