BeBOP: pOSKI
v1.0.0
parallel Optimized Sparse Kernel Interface library
|
Handle threading model routines. More...
#include <stdio.h>
#include <stdlib.h>
#include <poski/poski_threadcommon.h>
#include <poski/poski_matrix.h>
#include <poski/poski_malloc.h>
#include <poski/poski_print.h>
#include <poski/poski_system.h>
Functions | |
poski_threadarg_t * | poski_InitThreads () |
Create and initialize a thread object. | |
int | poski_DestroyThreads (poski_threadarg_t *threadargs) |
Destory a thread object. | |
int | poski_ThreadHints (poski_threadarg_t *threadargs, poski_mat_t A_tunable, poski_threadtype_t ttype, poski_int_t nthreads) |
Modify the threading model by user's threading hint. | |
int | poski_report_threadmodel (poski_threadarg_t *threadargs, poski_mat_t A) |
Report information of a thread object. |
Handle threading model routines.
This module implements the routines to handle the threading model.
Also, refer poski_Thread_common.c
poski_threadarg_t* poski_InitThreads | ( | ) |
Create and initialize a thread object.
This routine sets the threading model, number of threads, and map schedule for threads.
int poski_DestroyThreads | ( | poski_threadarg_t * | threadargs | ) |
Destory a thread object.
[in] | threadargs | A thread object. |
int poski_ThreadHints | ( | poski_threadarg_t * | threadargs, |
poski_mat_t | A_tunable, | ||
poski_threadtype_t | ttype, | ||
poski_int_t | nthreads | ||
) |
Modify the threading model by user's threading hint.
[in,out] | threadargs | A thread object. |
[in,out] | A_tunable | A tunable matrix object. |
[in] | ttype | The threading model type in {POSKI_PTHREAD, POSKI_THREADPOOL, POSKI_OPENMP}. |
[in] | nthreads | Number of threads. |
int poski_report_threadmodel | ( | poski_threadarg_t * | threadargs, |
poski_mat_t | A | ||
) |
Report information of a thread object.
[in] | threadargs | Thread object. |
[in] | A | Tunable matrix object. |