(git:6a2e663)
offload_api Module Reference

Fortran API for the offload package, which is written in C. More...

Functions/Subroutines

integer function, public offload_malloc_pinned_mem (buffer, length)
 allocate pinned memory. More...
 
integer function, public offload_free_pinned_mem (buffer)
 free pinned memory More...
 
subroutine, public offload_init ()
 Initialize runtime. More...
 
integer function, public offload_get_device_count ()
 Returns the number of available devices. More...
 
subroutine, public offload_set_chosen_device (device_id)
 Selects the chosen device to be used. More...
 
integer function, public offload_get_chosen_device ()
 Returns the chosen device. More...
 
subroutine, public offload_activate_chosen_device ()
 Activates the device selected via offload_set_chosen_device() More...
 
subroutine, public offload_timeset (routineN)
 Starts a timing range. More...
 
subroutine, public offload_timestop ()
 Ends a timing range. More...
 
subroutine, public offload_mem_info (free, total)
 Gets free and total device memory. More...
 
subroutine, public offload_create_buffer (length, buffer)
 Allocates a buffer of given length, ie. number of elements. More...
 
subroutine, public offload_free_buffer (buffer)
 Deallocates given buffer. More...
 

Detailed Description

Fortran API for the offload package, which is written in C.

Author
Ole Schuett

Function/Subroutine Documentation

◆ offload_malloc_pinned_mem()

integer function, public offload_api::offload_malloc_pinned_mem ( type(c_ptr)  buffer,
integer(c_size_t), value  length 
)

allocate pinned memory.

Parameters
bufferaddress of the buffer
lengthlength of the buffer
Returns
0

Definition at line 51 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_free_pinned_mem()

integer function, public offload_api::offload_free_pinned_mem ( type(c_ptr), value  buffer)

free pinned memory

Parameters
bufferaddress of the buffer
Returns
0

Definition at line 74 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_init()

subroutine, public offload_api::offload_init ( void  )

Initialize runtime.

Returns
...
Author
Rocco Meli

Definition at line 95 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_get_device_count()

integer function, public offload_api::offload_get_device_count ( void  )

Returns the number of available devices.

Returns
...
Author
Ole Schuett

Definition at line 111 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_set_chosen_device()

subroutine, public offload_api::offload_set_chosen_device ( integer, intent(in)  device_id)

Selects the chosen device to be used.

Parameters
device_id...
Author
Ole Schuett

Definition at line 131 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_get_chosen_device()

integer function, public offload_api::offload_get_chosen_device ( void  )

Returns the chosen device.

Returns
...
Author
Ole Schuett

Definition at line 151 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_activate_chosen_device()

subroutine, public offload_api::offload_activate_chosen_device ( void  )

Activates the device selected via offload_set_chosen_device()

Author
Ole Schuett

Definition at line 173 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_timeset()

subroutine, public offload_api::offload_timeset ( character(len=*), intent(in)  routineN)

Starts a timing range.

Parameters
routineN...
Author
Ole Schuett

Definition at line 190 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_timestop()

subroutine, public offload_api::offload_timestop ( void  )

Ends a timing range.

Author
Ole Schuett

Definition at line 208 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_mem_info()

subroutine, public offload_api::offload_mem_info ( integer(kind=int_8), intent(out)  free,
integer(kind=int_8), intent(out)  total 
)

Gets free and total device memory.

Parameters
free...
total...
Author
Ole Schuett

Definition at line 225 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_create_buffer()

subroutine, public offload_api::offload_create_buffer ( integer, intent(in)  length,
type(offload_buffer_type), intent(inout)  buffer 
)

Allocates a buffer of given length, ie. number of elements.

Parameters
length...
buffer...
Author
Ole Schuett

Definition at line 250 of file offload_api.F.

Here is the caller graph for this function:

◆ offload_free_buffer()

subroutine, public offload_api::offload_free_buffer ( type(offload_buffer_type), intent(inout)  buffer)

Deallocates given buffer.

Parameters
buffer...
Author
Ole Schuett

Definition at line 302 of file offload_api.F.

Here is the caller graph for this function: