 |
BEAGLE
3.1.2
An Application Programming Interface and High-Performance Computing Library for Statistical Phylogenetics
|
Go to the documentation of this file.
111 #include "libhmsbeagle/platform.h"
341 int compactBufferCount,
347 long preferenceFlags,
348 long requirementFlags,
351 int calculateDerivatives,
352 long benchmarkFlags);
386 int partialsBufferCount,
387 int compactBufferCount,
390 int eigenBufferCount,
391 int matrixBufferCount,
393 int scaleBufferCount,
396 long preferenceFlags,
397 long requirementFlags,
455 const int* inStates);
473 const double* inPartials);
489 const double* inPartials);
507 double* outPartials);
525 const double* inEigenVectors,
526 const double* inInverseEigenVectors,
527 const double* inEigenValues);
541 int stateFrequenciesIndex,
542 const double* inStateFrequencies);
556 int categoryWeightsIndex,
557 const double* inCategoryWeights);
570 const double* inCategoryRates);
584 int categoryRatesIndex,
585 const double* inCategoryRates);
598 const double* inPatternWeights);
614 const int* inPatternPartitions);
651 const int* firstIndices,
652 const int* secondIndices,
653 const int* resultIndices,
677 const int* probabilityIndices,
678 const int* firstDerivativeIndices,
679 const int* secondDerivativeIndices,
680 const double* edgeLengths,
704 const int* eigenIndices,
705 const int* categoryRateIndices,
706 const int* probabilityIndices,
707 const int* firstDerivativeIndices,
708 const int* secondDerivativeIndices,
709 const double* edgeLengths,
729 const double* inMatrix,
766 const int* matrixIndices,
767 const double* inMatrices,
768 const double* paddedValues,
802 int cumulativeScaleIndex);
853 const int* destinationPartials,
854 int destinationPartialsCount);
868 const int* scaleIndices,
870 int cumulativeScaleIndex);
885 const int* scaleIndices,
887 int cumulativeScaleIndex,
902 const int* scaleIndices,
904 int cumulativeScaleIndex);
921 const int* scaleIndices,
923 int cumulativeScaleIndex,
936 int cumulativeScaleIndex);
949 int cumulativeScaleIndex,
963 int destScalingIndex,
964 int srcScalingIndex);
977 double* outScaleFactors);
1002 const int* bufferIndices,
1003 const int* categoryWeightsIndices,
1004 const int* stateFrequenciesIndices,
1005 const int* cumulativeScaleIndices,
1007 double* outSumLogLikelihood);
1036 const int* bufferIndices,
1037 const int* categoryWeightsIndices,
1038 const int* stateFrequenciesIndices,
1039 const int* cumulativeScaleIndices,
1040 const int* partitionIndices,
1043 double* outSumLogLikelihoodByPartition,
1044 double* outSumLogLikelihood);
1074 const int* parentBufferIndices,
1075 const int* childBufferIndices,
1076 const int* probabilityIndices,
1077 const int* firstDerivativeIndices,
1078 const int* secondDerivativeIndices,
1079 const int* categoryWeightsIndices,
1080 const int* stateFrequenciesIndices,
1081 const int* cumulativeScaleIndices,
1083 double* outSumLogLikelihood,
1084 double* outSumFirstDerivative,
1085 double* outSumSecondDerivative);
1124 const int* parentBufferIndices,
1125 const int* childBufferIndices,
1126 const int* probabilityIndices,
1127 const int* firstDerivativeIndices,
1128 const int* secondDerivativeIndices,
1129 const int* categoryWeightsIndices,
1130 const int* stateFrequenciesIndices,
1131 const int* cumulativeScaleIndices,
1132 const int* partitionIndices,
1135 double* outSumLogLikelihoodByPartition,
1136 double* outSumLogLikelihood,
1137 double* outSumFirstDerivativeByPartition,
1138 double* outSumFirstDerivative,
1139 double* outSumSecondDerivativeByPartition,
1140 double* outSumSecondDerivative);
1159 double* outSumLogLikelihood);
1177 double* outSumFirstDerivative,
1178 double* outSumSecondDerivative);
1192 double* outLogLikelihoods);
1206 double* outFirstDerivatives,
1207 double* outSecondDerivatives);
1216 #endif // __beagle__
int destinationPartials
Definition: beagle.h:808
int child1TransitionMatrix
Definition: beagle.h:812
BEAGLE_DLLEXPORT int beagleUpdateTransitionMatricesWithMultipleModels(int instance, const int *eigenIndices, const int *categoryRateIndices, const int *probabilityIndices, const int *firstDerivativeIndices, const int *secondDerivativeIndices, const double *edgeLengths, int count)
Calculate a list of transition probability matrices with multiple models.
int child2TransitionMatrix
Definition: beagle.h:814
BEAGLE_DLLEXPORT int beagleSetCategoryRates(int instance, const double *inCategoryRates)
Set the default category rates buffer.
BEAGLE_DLLEXPORT int beagleSetEigenDecomposition(int instance, int eigenIndex, const double *inEigenVectors, const double *inInverseEigenVectors, const double *inEigenValues)
Set an eigen-decomposition buffer.
char * implDescription
Definition: beagle.h:223
BEAGLE_DLLEXPORT int beagleSetPartials(int instance, int bufferIndex, const double *inPartials)
Set an instance partials buffer.
const BEAGLE_DLLEXPORT char * beagleGetVersion(void)
Get version.
BEAGLE_DLLEXPORT int beagleRemoveScaleFactors(int instance, const int *scaleIndices, int count, int cumulativeScaleIndex)
Remove scale factors.
Description of a benchmarked hardware resource.
Definition: beagle.h:249
BEAGLE_DLLEXPORT int beagleResetScaleFactorsByPartition(int instance, int cumulativeScaleIndex, int partitionIndex)
Reset scalefactors by partition.
BeagleBenchmarkedResource * list
Definition: beagle.h:268
BEAGLE_DLLEXPORT int beagleSetTransitionMatrix(int instance, int matrixIndex, const double *inMatrix, double paddedValue)
Set a finite-time transition probability matrix.
BEAGLE_DLLEXPORT int beagleSetTipStates(int instance, int tipIndex, const int *inStates)
Set the compact state representation for tip node.
int child2Partials
Definition: beagle.h:813
BeagleFlags
Hardware and implementation capability flags.
Definition: beagle.h:142
BeagleOpCodes
Operation codes.
Definition: beagle.h:208
int child2Partials
Definition: beagle.h:781
long requiredFlags
Definition: beagle.h:254
BEAGLE_DLLEXPORT int beagleGetDerivatives(int instance, double *outSumFirstDerivative, double *outSumSecondDerivative)
Returns derivative sums subsequent to an asynchronous integration call.
BEAGLE_DLLEXPORT int beagleGetPartials(int instance, int bufferIndex, int scaleIndex, double *outPartials)
Get partials from an instance buffer.
int partition
Definition: beagle.h:815
BEAGLE_DLLEXPORT int beagleSetPatternPartitions(int instance, int partitionCount, const int *inPatternPartitions)
Set pattern partition assignments.
BEAGLE_DLLEXPORT int beagleAccumulateScaleFactors(int instance, const int *scaleIndices, int count, int cumulativeScaleIndex)
Accumulate scale factors.
BEAGLE_DLLEXPORT int beagleGetTransitionMatrix(int instance, int matrixIndex, double *outMatrix)
Get a finite-time transition probability matrix.
int child1Partials
Definition: beagle.h:779
const BEAGLE_DLLEXPORT char * beagleGetCitation(void)
Get citation.
BEAGLE_DLLEXPORT int beagleWaitForPartials(const int instance, const int *destinationPartials, int destinationPartialsCount)
Block until all calculations that write to the specified partials have completed.
BEAGLE_DLLEXPORT BeagleBenchmarkedResourceList * beagleGetBenchmarkedResourceList(int tipCount, int compactBufferCount, int stateCount, int patternCount, int categoryCount, int *resourceList, int resourceCount, long preferenceFlags, long requirementFlags, int eigenModelCount, int partitionCount, int calculateDerivatives, long benchmarkFlags)
Get a benchmarked list of hardware resources for the given analysis parameters.
BeagleBenchmarkFlags
Benchmarking mode flags for resource performance evaluation with beagleGetOrderedResourceList.
Definition: beagle.h:195
BEAGLE_DLLEXPORT int beagleCalculateRootLogLikelihoodsByPartition(int instance, const int *bufferIndices, const int *categoryWeightsIndices, const int *stateFrequenciesIndices, const int *cumulativeScaleIndices, const int *partitionIndices, int partitionCount, int count, double *outSumLogLikelihoodByPartition, double *outSumLogLikelihood)
Calculate site log likelihoods at a root node with per partition buffers.
A list of integer indices which specify a partial likelihoods operation for a partitioned analysis.
Definition: beagle.h:807
Ordered list of benchmarked hardware resources, from fastest to slowest.
Definition: beagle.h:267
int child1TransitionMatrix
Definition: beagle.h:780
BEAGLE_DLLEXPORT int beagleSetTransitionMatrices(int instance, const int *matrixIndices, const double *inMatrices, const double *paddedValues, int count)
Set multiple transition matrices.
BEAGLE_DLLEXPORT int beagleUpdatePartialsByPartition(const int instance, const BeagleOperationByPartition *operations, int operationCount)
Calculate or queue for calculation partials using a list of partition operations.
char * name
Definition: beagle.h:251
BEAGLE_DLLEXPORT int beagleGetSiteLogLikelihoods(int instance, double *outLogLikelihoods)
Get site log likelihoods for last beagleCalculateRootLogLikelihoods or beagleCalculateEdgeLogLikeliho...
BEAGLE_DLLEXPORT int beagleCalculateEdgeLogLikelihoodsByPartition(int instance, const int *parentBufferIndices, const int *childBufferIndices, const int *probabilityIndices, const int *firstDerivativeIndices, const int *secondDerivativeIndices, const int *categoryWeightsIndices, const int *stateFrequenciesIndices, const int *cumulativeScaleIndices, const int *partitionIndices, int partitionCount, int count, double *outSumLogLikelihoodByPartition, double *outSumLogLikelihood, double *outSumFirstDerivativeByPartition, double *outSumFirstDerivative, double *outSumSecondDerivativeByPartition, double *outSumSecondDerivative)
Calculate multiple site log likelihoods and derivatives along an edge with per partition buffers.
BEAGLE_DLLEXPORT int beagleSetCategoryRatesWithIndex(int instance, int categoryRatesIndex, const double *inCategoryRates)
Set a category rates buffer.
BEAGLE_DLLEXPORT int beagleSetPatternWeights(int instance, const double *inPatternWeights)
Set pattern weights.
BEAGLE_DLLEXPORT int beagleSetStateFrequencies(int instance, int stateFrequenciesIndex, const double *inStateFrequencies)
Set a state frequency buffer.
int destinationPartials
Definition: beagle.h:776
char * implName
Definition: beagle.h:256
int destinationScaleWrite
Definition: beagle.h:777
char * description
Definition: beagle.h:233
BEAGLE_DLLEXPORT int beagleSetCategoryWeights(int instance, int categoryWeightsIndex, const double *inCategoryWeights)
Set a category weights buffer.
BEAGLE_DLLEXPORT int beagleCopyScaleFactors(int instance, int destScalingIndex, int srcScalingIndex)
Copy scale factors.
BEAGLE_DLLEXPORT int beagleCalculateEdgeLogLikelihoods(int instance, const int *parentBufferIndices, const int *childBufferIndices, const int *probabilityIndices, const int *firstDerivativeIndices, const int *secondDerivativeIndices, const int *categoryWeightsIndices, const int *stateFrequenciesIndices, const int *cumulativeScaleIndices, int count, double *outSumLogLikelihood, double *outSumFirstDerivative, double *outSumSecondDerivative)
Calculate site log likelihoods and derivatives along an edge.
BEAGLE_DLLEXPORT int beagleGetLogLikelihood(int instance, double *outSumLogLikelihood)
Returns log likelihood sum and subsequent to an asynchronous integration call.
BEAGLE_DLLEXPORT int beagleFinalize(void)
Finalize the library.
char * resourceName
Definition: beagle.h:219
BEAGLE_DLLEXPORT int beagleAccumulateScaleFactorsByPartition(int instance, const int *scaleIndices, int count, int cumulativeScaleIndex, int partitionIndex)
Accumulate scale factors by partition.
int destinationScaleRead
Definition: beagle.h:778
int child2TransitionMatrix
Definition: beagle.h:782
List of hardware resources.
Definition: beagle.h:241
BEAGLE_DLLEXPORT int beagleFinalizeInstance(int instance)
Finalize this instance.
int length
Definition: beagle.h:243
BEAGLE_DLLEXPORT int beagleCalculateRootLogLikelihoods(int instance, const int *bufferIndices, const int *categoryWeightsIndices, const int *stateFrequenciesIndices, const int *cumulativeScaleIndices, int count, double *outSumLogLikelihood)
Calculate site log likelihoods at a root node.
BEAGLE_DLLEXPORT int beagleUpdateTransitionMatrices(int instance, int eigenIndex, const int *probabilityIndices, const int *firstDerivativeIndices, const int *secondDerivativeIndices, const double *edgeLengths, int count)
Calculate a list of transition probability matrices.
BEAGLE_DLLEXPORT int beagleUpdatePartials(const int instance, const BeagleOperation *operations, int operationCount, int cumulativeScaleIndex)
Calculate or queue for calculation partials using a list of operations.
int returnCode
Definition: beagle.h:255
long flags
Definition: beagle.h:224
BEAGLE_DLLEXPORT int beagleRemoveScaleFactorsByPartition(int instance, const int *scaleIndices, int count, int cumulativeScaleIndex, int partitionIndex)
Remove scale factors by partition.
int length
Definition: beagle.h:269
char * description
Definition: beagle.h:252
long benchedFlags
Definition: beagle.h:257
int number
Definition: beagle.h:250
A list of integer indices which specify a partial likelihoods operation.
Definition: beagle.h:775
double performanceRatio
Definition: beagle.h:260
int cumulativeScaleIndex
Definition: beagle.h:816
BEAGLE_DLLEXPORT int beagleCreateInstance(int tipCount, int partialsBufferCount, int compactBufferCount, int stateCount, int patternCount, int eigenBufferCount, int matrixBufferCount, int categoryCount, int scaleBufferCount, int *resourceList, int resourceCount, long preferenceFlags, long requirementFlags, BeagleInstanceDetails *returnInfo)
Create a single instance.
int destinationScaleWrite
Definition: beagle.h:809
char * implName
Definition: beagle.h:221
BEAGLE_DLLEXPORT int beagleGetScaleFactors(int instance, int srcScalingIndex, double *outScaleFactors)
Get scale factors.
int child1Partials
Definition: beagle.h:811
BEAGLE_DLLEXPORT int beagleResetScaleFactors(int instance, int cumulativeScaleIndex)
Reset scalefactors.
long supportFlags
Definition: beagle.h:253
int destinationScaleRead
Definition: beagle.h:810
long requiredFlags
Definition: beagle.h:235
BEAGLE_DLLEXPORT BeagleResourceList * beagleGetResourceList(void)
Get list of hardware resources.
BeagleReturnCodes
Error return codes.
Definition: beagle.h:120
Information about a specific instance.
Definition: beagle.h:217
long supportFlags
Definition: beagle.h:234
BeagleResource * list
Definition: beagle.h:242
Description of a hardware resource.
Definition: beagle.h:231
char * name
Definition: beagle.h:232
BEAGLE_DLLEXPORT int beagleGetSiteDerivatives(int instance, double *outFirstDerivatives, double *outSecondDerivatives)
Get site derivatives for last beagleCalculateEdgeLogLikelihoods call.
BEAGLE_DLLEXPORT int beagleConvolveTransitionMatrices(int instance, const int *firstIndices, const int *secondIndices, const int *resultIndices, int matrixCount)
Set partitions by pattern weight.
BEAGLE_DLLEXPORT int beagleSetCPUThreadCount(int instance, int threadCount)
Set number of threads for native CPU implementation.
int resourceNumber
Definition: beagle.h:218
BEAGLE_DLLEXPORT int beagleSetTipPartials(int instance, int tipIndex, const double *inPartials)
Set an instance partials buffer for tip node.
double benchmarkResult
Definition: beagle.h:259