j3-fortran / fortran_proposals

Proposals for the Fortran Standard Committee
178 stars 15 forks source link

US15 Simple procedures #161

Open zjibben opened 4 years ago

zjibben commented 4 years ago

A procedure that does not reference outside variables is easier to offload to a device, or other off-chip processor.

PURE procedures operate without writing to global variables beyond their arguments, SIMPLE procedures would be further restricted from referencing global variables beyond their arguments.

klausler commented 4 years ago

Another subtle benefit from using SIMPLE procedures is that SIMPLE procedure pointers don't need to waste space for a "static link" to potential host-associated objects; mere code address(es) suffice.