specification of the main routines for handling threads (annotation: the source code of paceval_fThreadHandling.cpp can be given to customers to perform specialized thread handling)
More...
|
| unsigned long | paceval_activityGet_Thread_system_maxNumberThreads (unsigned long system_numberCores_in, unsigned long system_maxNumberThreads_in) |
| |
| void | paceval_activityStart_Thread_CreateComputation (PACEVAL_HANDLE handle_pacevalComputation_in, const char *functionString_in, unsigned long numberOfVariables_in, const char *variables_in, bool useInterval_in) |
| |
| void | paceval_activityEnd_Thread_CreateComputation (PACEVAL_HANDLE handle_pacevalComputation_in, const char *functionString_in, unsigned long numberOfVariables_in, const char *variables_in, bool useInterval_in, bool success_in, unsigned long numberOfNodes_in) |
| |
| void | paceval_activityStart_Thread_DeleteComputation (PACEVAL_HANDLE handle_pacevalComputation_in) |
| |
| bool | paceval_activityAccept_Thread_MultithreadOpportunity (PACEVAL_HANDLE handle_pacevalComputation_in, unsigned long startSpecificAtNode_in, unsigned long endSpecificAtNode_in) |
| |
| void | paceval_activityStart_Thread_GetComputationResult (PACEVAL_HANDLE handle_pacevalComputation_in) |
| |
| bool | paceval_activityMain_Thread_GetComputationResult (PACEVAL_HANDLE handle_pacevalComputation_in, paceval_eCalculationPrecisionTypes useCalculationPrecision_in, unsigned long numberOfThreads_in, unsigned int sizeOfLongDouble_in, void *result_out, void *lastErrorInformation_out, void *trustedMinResult_out, void *trustedMaxResult_out) |
| |
| void | paceval_activitySetCache_Thread_GetComputationResult (PACEVAL_HANDLE handle_pacevalComputation_in, bool *useMutex_out_in, const unsigned long stackNumber_in, unsigned long startSpecificAtNode_in, unsigned long endSpecificAtNode_in) |
| |
| void | paceval_activityUseCache_Thread_GetComputationResult (PACEVAL_HANDLE handle_pacevalComputation_in, const bool isMainCalculation_in, const unsigned long stackNumber_in, unsigned long startSpecificAtNode_in, unsigned long endSpecificAtNode_in) |
| |
| void | paceval_activityEnd_Thread_GetComputationResult (PACEVAL_HANDLE handle_pacevalComputation_in, bool success_in) |
| |
specification of the main routines for handling threads (annotation: the source code of paceval_fThreadHandling.cpp can be given to customers to perform specialized thread handling)
◆ paceval_activityAccept_Thread_MultithreadOpportunity()
| bool paceval_activityAccept_Thread_MultithreadOpportunity |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in, |
|
|
unsigned long | startSpecificAtNode_in, |
|
|
unsigned long | endSpecificAtNode_in ) |
decides the multithreaded lookahead caching capabilities for a sequence of node objects and returns whether such caching capability exists (true) or not (false)
- Parameters
-
| handle_pacevalComputation_in | identifies the computation object created via pacevalLibrary_CreateComputation() |
| startSpecificAtNode_in | specifies the node at which the calculation is started |
| endSpecificAtNode_in | specifies the node at which the calculation ends |
◆ paceval_activityEnd_Thread_CreateComputation()
| void paceval_activityEnd_Thread_CreateComputation |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in, |
|
|
const char * | functionString_in, |
|
|
unsigned long | numberOfVariables_in, |
|
|
const char * | variables_in, |
|
|
bool | useInterval_in, |
|
|
bool | success_in, |
|
|
unsigned long | numberOfNodes_in ) |
this function is called when the creation of the computation object ends (annotation: success_in specifies whether the computation object was created successfully (true) or not (false))
- Parameters
-
| handle_pacevalComputation_in | identifies the computation object created via pacevalLibrary_CreateComputation() |
| functionString_in | points to a null-terminated string to be used as the function to work with |
| numberOfVariables_in | specifies the number of variables to work with (e.g. if the variables are "xValue yValue zValue" or "x y z" numberOfVariables_in must be set to 3) |
| variables_in | points to a null-terminated string specifying the names of the working variables (generally the variables must be separated by a blank, e.g. the variables xValue, yValue, zValue must be set with "xValue yValue zValue" or the variables x, y, z must be set with "x y z") |
| useInterval_in | enables or disables the Trusted Interval Computation, TINC (paceval specific) putting bounds on rounding errors and measurement errors of the computation system to yield reliable results |
| success_in | specifies whether the computation object was created successfully (true) or not (false) |
| numberOfNodes_in | specifies the number of nodes in the linked list of atomic suboperations |
◆ paceval_activityEnd_Thread_GetComputationResult()
| void paceval_activityEnd_Thread_GetComputationResult |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in, |
|
|
bool | success_in ) |
this function is called when the calculation on a paceval_cComputation object ends
- Parameters
-
| handle_pacevalComputation_in | identifies the computation object created via pacevalLibrary_CreateComputation() |
| success_in | specifies whether the calculation was successful (true) or not (false) |
◆ paceval_activityGet_Thread_system_maxNumberThreads()
| unsigned long paceval_activityGet_Thread_system_maxNumberThreads |
( |
unsigned long | system_numberCores_in, |
|
|
unsigned long | system_maxNumberThreads_in ) |
returns the maximum number of threads for a computation for this system
- Parameters
-
| system_numberCores_in | specifies the the number of cores available in the system |
| system_maxNumberThreads_in | specifies the the number of threads available in the system (annotation: this number is precomputed by paceval and can be overridden by the return value of this function) |
◆ paceval_activityMain_Thread_GetComputationResult()
| bool paceval_activityMain_Thread_GetComputationResult |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in, |
|
|
paceval_eCalculationPrecisionTypes | useCalculationPrecision_in, |
|
|
unsigned long | numberOfThreads_in, |
|
|
unsigned int | sizeOfLongDouble_in, |
|
|
void * | result_out, |
|
|
void * | lastErrorInformation_out, |
|
|
void * | trustedMinResult_out, |
|
|
void * | trustedMaxResult_out ) |
this function is called when the calculation is to be performed on a computation object (annotation: the general strategy is that only the strongest, i.e. the fastest, survive)
- Parameters
-
| handle_pacevalComputation_in | identifies the computation object created via pacevalLibrary_CreateComputation() |
| useCalculationPrecision_in | specifies the precision with which the calculation should be performed |
| numberOfThreads_in | specifies the number of threads to use |
| sizeOfLongDouble_in | specifies the size in bytes of long double in the calling system determined via sizeof(long double) |
| result_out | the buffer for the result of the calculation in the precision defined with useCalculationPrecision_in (annotation: in case of an error the value is not specified) |
| trustedMinResult_out | if Trusted Interval Computation was enabled by pacevalLibrary_CreateComputation() this retrieves the minimum/lower interval limit of the computation (annotation: in case of an error the value is not specified) |
| trustedMaxResult_out | if Trusted Interval Computation was enabled by pacevalLibrary_CreateComputation() this retrieves the maximum/upper interval limit limit of the computation (annotation: in case of an error the value is not specified) |
◆ paceval_activitySetCache_Thread_GetComputationResult()
| void paceval_activitySetCache_Thread_GetComputationResult |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in, |
|
|
bool * | useMutex_out_in, |
|
|
const unsigned long | stackNumber_in, |
|
|
unsigned long | startSpecificAtNode_in, |
|
|
unsigned long | endSpecificAtNode_in ) |
this function is called when the calculation locks parallel computation by a thread so that data for caching, for example, does not overwrite each other
- Parameters
-
| handle_pacevalComputation_in | identifies the computation object created via pacevalLibrary_CreateComputation() |
| useMutex_out_in | specifies whether a mutex object should be used for locking (true) or not (false) (annotation: by default, useMutex_out_in is set so that a mutex is used when writing the cache) |
| stackNumber_in | specifies the number of the stack that is being worked with in a locked manner |
| startSpecificAtNode_in | specifies the node at which the calculation is started by the thread |
| endSpecificAtNode_in | specifies the node at which the calculation ends by the thread |
◆ paceval_activityStart_Thread_CreateComputation()
| void paceval_activityStart_Thread_CreateComputation |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in, |
|
|
const char * | functionString_in, |
|
|
unsigned long | numberOfVariables_in, |
|
|
const char * | variables_in, |
|
|
bool | useInterval_in ) |
this function is called when the creation of the computation object starts
- Parameters
-
| handle_pacevalComputation_in | identifies the computation object created via pacevalLibrary_CreateComputation() |
| functionString_in | points to a null-terminated string to be used as the function to work with |
| numberOfVariables_in | specifies the number of variables to work with (e.g. if the variables are "xValue yValue zValue" or "x y z" numberOfVariables_in must be set to 3) |
| variables_in | points to a null-terminated string specifying the names of the working variables (generally the variables must be separated by a blank, e.g. the variables xValue, yValue, zValue must be set with "xValue yValue zValue" or the variables x, y, z must be set with "x y z") |
| useInterval_in | enables or disables the Trusted Interval Computation, TINC (paceval specific) putting bounds on rounding errors and measurement errors of the computation system to yield reliable results |
◆ paceval_activityStart_Thread_DeleteComputation()
| void paceval_activityStart_Thread_DeleteComputation |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in | ) |
|
this function is called when the deletion of the computation object starts
- Parameters
-
◆ paceval_activityStart_Thread_GetComputationResult()
| void paceval_activityStart_Thread_GetComputationResult |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in | ) |
|
◆ paceval_activityUseCache_Thread_GetComputationResult()
| void paceval_activityUseCache_Thread_GetComputationResult |
( |
PACEVAL_HANDLE | handle_pacevalComputation_in, |
|
|
const bool | isMainCalculation_in, |
|
|
const unsigned long | stackNumber_in, |
|
|
unsigned long | startSpecificAtNode_in, |
|
|
unsigned long | endSpecificAtNode_in ) |
this function is called when the calculation uses data for caching
- Parameters
-
| handle_pacevalComputation_in | identifies the computation object created via pacevalLibrary_CreateComputation() |
| isMainCalculation_in | specifies whether this is the main calculation (true) or not (false) |
| stackNumber_in | specifies the number of the stack that is being worked with in a locked manner |
| startSpecificAtNode_in | specifies the node at which the calculation is started by the thread |
| endSpecificAtNode_in | specifies the node at which the calculation ends by the thread |