Skip to content
Snippets Groups Projects
Commit 25dcdef6 authored by Aidan Chalk's avatar Aidan Chalk
Browse files

Version 0 of the FORTRAN bindings for FORTRAN

parent f9c431d4
No related branches found
No related tags found
1 merge request!8[WIP] Fortran bindings
Module quicksched
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Interface
!!TODO May need a qsched_get_qsched to get a pointer?
Subroutine qsched_init(s, nr_queues, flags) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: nr_queues
Integer(Kind=C_INT), Intent(In), VALUE :: flags
End Subroutine
Integer(Kind=C_INT) Function qsched_addres(s, owner, parent) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: owner
Integer(Kind=C_INT), Intent(In), VALUE :: parent
End Function
Subroutine qsched_addlock(s, t, res) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: t
Integer(Kind=C_INT), Intent(In), VALUE :: res
End Subroutine
Subroutine qsched_addunlock(s, ta, tb) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: ta
Integer(Kind=C_INT), Intent(In), VALUE :: tb
End Subroutine
Integer(Kind=C_INT) Function qsched_addtask(s, types, flags, data, data_size, cost) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: types
Integer(Kind=C_INT), Intent(In), VALUE :: flags !TODO Careful with unsigned
Type(C_PTR), Intent(In), VALUE :: data
Integer(Kind=C_INT), Intent(In), VALUE :: data_size
IntegeR(Kind=C_INT), Intent(In), VALUE :: cost
End Function
Subroutine qsched_adduse(s, t, res) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: t
Integer(Kind=C_INT), Intent(In), VALUE :: res
End Subroutine
Subroutine qsched_free(s) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
End Subroutine
Subroutine qsched_run(s, nr_threads, fun) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: nr_threads
Type(C_FUNPTR), INTENT(In), VALUE :: fun
End Subroutine
Subroutine qsched_reset(s) BIND(C)
Use, Intrinsic :: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
End Subroutine
!TODO Not supporting qsched_addtask_dynamic yet.
Subroutine qsched_ensure(s, nr_tasks, nr_res, nr_deps, nr_locks, nr_uses, size_data)
Use, Intrinsic:: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: nr_tasks
Integer(Kind=C_INT), Intent(In), VALUE :: nr_res
Integer(Kind=C_INT), Intent(In), VALUE :: nr_deps
Integer(Kind=C_INT), Intent(In), VALUE :: nr_locks
Integer(Kind=C_INT), Intent(In), VALUE :: nr_uses
Integer(Kind=C_INT), Intent(In), VALUE :: size_data
End Subroutine
Subroutine qsched_res_own(s, res, owner)
Use, Intrinsic:: ISO_C_BINDING
Implicit None
Type(C_PTR), Intent(InOut), VALUE :: s
Integer(Kind=C_INT), Intent(In), VALUE :: res
Integer(Kind=C_INT), Intent(In), VALUE :: owner
End Subroutine
End Interface
End Module quicksched
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment