Low-level API
The Ginkgo.API
submodule provides a low-level interface which closely matches the Ginkgo C API. While these functions are not intended for general usage, they are useful for calling Ginkgo routines not yet available in Ginkgo.jl
main interface, and is the basis for the high-level wrappers. For illustrative purpose, we use a example api.jl
here, yet to be replaced.
Ginkgo.API.ginkgo_dim2_cols_get
— Methodginkgo_dim2_cols_get(dim)
Obtains the value of the second element of a gko::dim<2> type
Parameters
dim
: An object ofgko_dim2_st
type
Returns
size_t Second dimension
Ginkgo.API.ginkgo_dim2_create
— Methodginkgo_dim2_create(rows, cols)
Allocates memory for a C-based reimplementation of the gko::dim<2> type
Parameters
rows
: First dimensioncols
: Second dimension
Returns
gko_dim2_st
C struct that contains members of the gko::dim<2> type
Ginkgo.API.ginkgo_dim2_rows_get
— Methodginkgo_dim2_rows_get(dim)
Obtains the value of the first element of a gko::dim<2> type
Parameters
dim
: An object ofgko_dim2_st
type
Returns
size_t First dimension
Ginkgo.API.ginkgo_executor_delete
— Methodginkgo_executor_delete(exec_st_ptr)
Deallocates memory for an executor on targeted device.
Parameters
exec_st_ptr
: Raw pointer to the shared pointer of the executor to be deleted
Ginkgo.API.ginkgo_matrix_csr_f32_i32_apply
— Methodginkgo_matrix_csr_f32_i32_apply(mat_st_ptr, alpha, x, beta, y)
Performs an SpMM product
Parameters
mat_st_ptr
:alpha
:x
:beta
:y
:
Ginkgo.API.ginkgo_version_get
— Methodginkgo_version_get()
This function is a wrapper for obtaining the version of the ginkgo library
Ginkgo.API.gko_dim2_st
— Typegko_dim2_st
Struct implements the gko::dim<2> type
Ginkgo.API.gko_executor
— TypeType of the pointer to the wrapped gko_executor_st
struct
Ginkgo.API.gko_executor_st
— TypeStruct containing the shared pointer to a ginkgo executor