paceval. 4.26
Documentation of the paceval. source-code, Copyright ©1994-2024. Version 1.x, 2.x, 3.x, 4.x ©1994-2025 Joerg Koenning & paceval UG [Registered Trade Mark] All rights reserved., Author(s) : Joerg Koenning
Loading...
Searching...
No Matches
Functions
paceval_fThreadHandling.h File Reference

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...

#include "../../source_public/inc/paceval_main.h"
Include dependency graph for paceval_fThreadHandling.h:
This graph shows which files directly or indirectly include this file:

Functions

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)
 

Detailed Description

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)

Function Documentation

◆ 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_inidentifies the computation object created via pacevalLibrary_CreateComputation()
startSpecificAtNode_inspecifies the node at which the calculation is started
endSpecificAtNode_inspecifies the node at which the calculation ends
Here is the caller graph for this function:

◆ 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_inidentifies the computation object created via pacevalLibrary_CreateComputation()
functionString_inpoints to a null-terminated string to be used as the function to work with
numberOfVariables_inspecifies 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_inpoints 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_inenables 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_inspecifies whether the computation object was created successfully (true) or not (false)
numberOfNodes_inspecifies the number of nodes in the linked list of atomic suboperations
Here is the caller graph for this function:

◆ 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_inidentifies the computation object created via pacevalLibrary_CreateComputation()
success_inspecifies whether the calculation was successful (true) or not (false)
Here is the caller graph for this function:

◆ 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_inspecifies the the number of cores available in the system
system_maxNumberThreads_inspecifies 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)
Here is the caller graph for 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_inidentifies the computation object created via pacevalLibrary_CreateComputation()
useCalculationPrecision_inspecifies the precision with which the calculation should be performed
numberOfThreads_inspecifies the number of threads to use
sizeOfLongDouble_inspecifies the size in bytes of long double in the calling system determined via sizeof(long double)
result_outthe 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_outif 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_outif 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)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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_inidentifies the computation object created via pacevalLibrary_CreateComputation()
useMutex_out_inspecifies 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_inspecifies the number of the stack that is being worked with in a locked manner
startSpecificAtNode_inspecifies the node at which the calculation is started by the thread
endSpecificAtNode_inspecifies the node at which the calculation ends by the thread
Here is the caller graph for this function:

◆ 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_inidentifies the computation object created via pacevalLibrary_CreateComputation()
functionString_inpoints to a null-terminated string to be used as the function to work with
numberOfVariables_inspecifies 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_inpoints 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_inenables 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
Here is the caller graph for this function:

◆ 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
handle_pacevalComputation_inidentifies the computation object created via pacevalLibrary_CreateComputation()
Here is the caller graph for this function:

◆ paceval_activityStart_Thread_GetComputationResult()

void paceval_activityStart_Thread_GetComputationResult ( PACEVAL_HANDLE handle_pacevalComputation_in)

this function is called when the calculation on a paceval_cComputation object starts

Parameters
handle_pacevalComputation_inidentifies the computation object created via pacevalLibrary_CreateComputation()
Here is the caller graph for this function:

◆ 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_inidentifies the computation object created via pacevalLibrary_CreateComputation()
isMainCalculation_inspecifies whether this is the main calculation (true) or not (false)
stackNumber_inspecifies the number of the stack that is being worked with in a locked manner
startSpecificAtNode_inspecifies the node at which the calculation is started by the thread
endSpecificAtNode_inspecifies the node at which the calculation ends by the thread
Here is the caller graph for this function:

https://paceval.com