mod_interface.f90 2.4 KB

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