GPUart  1.01
Prototype of GPUart, an application-based limited preemptive GPU scheduler for embedded real-time systems
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
GPUart_Service_IF.h File Reference

This interface provides the service-orientated init-, call-, and query-interfaces, respectively for each kernel. More...

#include "../GPUart_Common/GPUart_Common.h"
Include dependency graph for GPUart_Service_IF.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GPUart_Retval gpuA_Sobel1_init (void)
 Initialize GPU data for the Sobel1 kernel. More...
 
GPUart_Retval gpuA_Sobel1_call (sint32 *sob1_matrix_in_s32_swc)
 Instantiates a Sobel1 kernel instance and updates kernel related GPU data. More...
 
GPUart_Retval gpuA_Sobel1_query (sint32 *sob1_matrix_out_s32_swc)
 Query whether Sobel1 kernel instance has completed and get kernel output data. More...
 
GPUart_Retval gpuA_Sobel2_init (void)
 Initialize GPU data for the Sobel2 kernel. More...
 
GPUart_Retval gpuA_Sobel2_call (sint32 *sob2_matrix_in_s32_swc)
 Instantiates a Sobel2 kernel instance and updates kernel related GPU data. More...
 
GPUart_Retval gpuA_Sobel2_query (sint32 *sob2_matrix_out_s32_swc)
 Query whether Sobel2 kernel instance has completed and get kernel output data. More...
 
GPUart_Retval gpuA_MM_init (void)
 Initialize GPU data for the MatrMul kernel. More...
 
GPUart_Retval gpuA_MM_call (float32 *mm_MatrixA_f32_swc, float32 *mm_MatrixB_f32_swc)
 Instantiates a MatrMul kernel instance and updates kernel related GPU data. More...
 
GPUart_Retval gpuA_MM_query (float32 *mm_MatrixC_f32_swc)
 Query whether MatrMul kernel instance has completed and get kernel output data. More...
 

Detailed Description

This interface provides the service-orientated init-, call-, and query-interfaces, respectively for each kernel.

All host-sided applications which must be able to trigger GPGPU kernel must include this interface. Call a kernel's init-interface to initialize kernel related GPU data. Call a kernel's call-interface to enqueue a new kernel instance in the scheduler and update GPU data. Call a kernel's query-interface to query kernel completion and to get the output of the kernel. This layer is used to achieve higher portability by abstracting the systems's heterogeneity.

Author
Christoph Hartmann
Date
Created on: 3 Apr 2017

Function Documentation

GPUart_Retval gpuA_MM_call ( float32 mm_MatrixA_f32_swc,
float32 mm_MatrixB_f32_swc 
)

Instantiates a MatrMul kernel instance and updates kernel related GPU data.

Checks whether the scheduler is ready to enqueue a new instance of this kernel. Updates kernel related GPU data and then instantiates kernel instance.

Parameters
[in]float32*mm_MatrixA_f32_swc -> Input matrix A for MutrMul kernel (C = A x B).
[in]float32*mm_MatrixB_f32_swc -> Input matrix B for MutrMul kernel (C = A x B).
Returns
GPUART_SUCCESS if data have been updated and kernel has been instantiated successfully.
GPUART_ERROR_NOT_READY if kernel has already been instantiated.
GPUART_ERROR_INVALID_ARGUMENT if one ore more global memory IDs (device_global_memory_id_e) inside this function are invalid.

Here is the call graph for this function:

Here is the caller graph for this function:

GPUart_Retval gpuA_MM_init ( void  )

Initialize GPU data for the MatrMul kernel.

All kernel related constant memory data can be initialized by calling this function. Initialize global memory data here. This function must be called before launching the first kernel instance.

Parameters
void
Returns
GPUART_SUCCESS
GPUart_Retval gpuA_MM_query ( float32 mm_MatrixC_f32_swc)

Query whether MatrMul kernel instance has completed and get kernel output data.

Calls the scheduling layer to get the completion status of the current kernel instance and updates the output data of this kernel.

Parameters
[out]float32*mm_MatrixC_f32_swc -> Output matrix C of the MatrMul kernel (C = A x B).
Returns
GPUART_SUCCESS if kernel instance has completed and data have been updated successfully.
GPUART_ERROR_NOT_READY if kernel instance is still active.
GPUART_ERROR_INVALID_ARGUMENT if one ore more global memory IDs (device_global_memory_id_e) inside this functionare invalid.

Here is the call graph for this function:

Here is the caller graph for this function:

GPUart_Retval gpuA_Sobel1_call ( sint32 sob1_matrix_in_s32_swc)

Instantiates a Sobel1 kernel instance and updates kernel related GPU data.

Checks whether the scheduler is ready to enqueue a new instance of this kernel. Updates kernel related GPU data and then instantiates kernel instance.

Parameters
[in]sint32*sob1_matrix_in_s32_swc -> Sobel1 input matrix.
Returns
GPUART_SUCCESS if data have been updated and kernel has been instantiated successfully.
GPUART_ERROR_NOT_READY if kernel has already been instantiated.
GPUART_ERROR_INVALID_ARGUMENT if one ore more global memory IDs (device_global_memory_id_e) inside this function are invalid.

Here is the call graph for this function:

Here is the caller graph for this function:

GPUart_Retval gpuA_Sobel1_init ( void  )

Initialize GPU data for the Sobel1 kernel.

All kernel related constant memory data can be initialized by calling this function. Initialize global memory data here. This function must be called before launching the first kernel instance.

Parameters
void
Returns
GPUART_SUCCESS
GPUart_Retval gpuA_Sobel1_query ( sint32 sob1_matrix_out_s32_swc)

Query whether Sobel1 kernel instance has completed and get kernel output data.

Calls the scheduling layer to get the completion status of the current kernel instance and updates the output data of this kernel.

Parameters
[out]sint32*sob1_matrix_out_s32_swc -> Sobel1 output matrix.
Returns
GPUART_SUCCESS if kernel instance has completed and data have been updated successfully.
GPUART_ERROR_NOT_READY if kernel instance is still active.
GPUART_ERROR_INVALID_ARGUMENT if one ore more global memory IDs (device_global_memory_id_e) inside this functionare invalid.

Here is the call graph for this function:

Here is the caller graph for this function:

GPUart_Retval gpuA_Sobel2_call ( sint32 sob2_matrix_in_s32_swc)

Instantiates a Sobel2 kernel instance and updates kernel related GPU data.

Checks whether the scheduler is ready to enqueue a new instance of this kernel. Updates kernel related GPU data and then instantiates kernel instance.

Parameters
[in]sint32*sob2_matrix_in_s32_swc -> Sobel2 input matrix.
Returns
GPUART_SUCCESS if data have been updated and kernel has been instantiated successfully.
GPUART_ERROR_NOT_READY if kernel has already been instantiated.
GPUART_ERROR_INVALID_ARGUMENT if one ore more global memory IDs (device_global_memory_id_e) inside this function are invalid.

Here is the call graph for this function:

Here is the caller graph for this function:

GPUart_Retval gpuA_Sobel2_init ( void  )

Initialize GPU data for the Sobel2 kernel.

All kernel related constant memory data can be initialized by calling this function. Initialize global memory data here. This function must be called before launching the first kernel instance.

Parameters
void
Returns
GPUART_SUCCESS
GPUart_Retval gpuA_Sobel2_query ( sint32 sob2_matrix_out_s32_swc)

Query whether Sobel2 kernel instance has completed and get kernel output data.

Calls the scheduling layer to get the completion status of the current kernel instance and updates the output data of this kernel.

Parameters
[out]sint32*sob2_matrix_out_s32_swc -> Sobel2 output matrix.
Returns
GPUART_SUCCESS if kernel instance has completed and data have been updated successfully.
GPUART_ERROR_NOT_READY if kernel instance is still active.
GPUART_ERROR_INVALID_ARGUMENT if one ore more global memory IDs (device_global_memory_id_e) inside this functionare invalid.

Here is the call graph for this function:

Here is the caller graph for this function: