Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
phylo
fastcodeml
Commits
a7c7aee6
Commit
a7c7aee6
authored
Dec 03, 2015
by
Iakov Davydov
Browse files
fix multiple angular brackets and some comments formatting
parent
6db2cd70
Changes
21
Hide whitespace changes
Inline
Side-by-side
BranchSiteModel.cpp
View file @
a7c7aee6
...
...
@@ -273,16 +273,11 @@ void BranchSiteModel::setLimits(size_t aNumTimes, size_t aNumVariables,
}
else
{
mLowerBound
.
reserve
(
aNumTimes
+
aNumVariables
);
mUpperBound
.
reserve
(
aNumTimes
+
aNumVariables
);
// Set lower constrains // Set
// upper
// constrains
// Set lower & upper constrains
mLowerBound
.
assign
(
aNumTimes
,
0
);
mUpperBound
.
assign
(
aNumTimes
,
50.0
);
// T
}
// Set lower constrains // Set
// upper
// constrains
#ifdef USE_ORIGINAL_PROPORTIONS
mLowerBound
.
push_back
(
-
99.0
);
mUpperBound
.
push_back
(
99.0
);
// x0 -> p0
...
...
CodeMLoptimizer.h
View file @
a7c7aee6
...
...
@@ -17,27 +17,21 @@ class Ming2 {
public:
/// Constructor
///
/// @param[in] aModel The pointer to the hypothesis class that will
/// be
/// used
/// @param[in] aTrace Trace or not the optimizer
/// progress
/// @param[in] aVerbose The verbose level
/// @param[in] aLowerBound Lower limit of the variables to constrain
/// the
/// interval on which the optimum should be computed
/// @param[in] aUpperBound Upper limit of the variables to constrain
/// the
/// interval on which the optimum should be computed
/// @param[in] aDeltaForGradient Delta used to compute the gradient
/// @param[in] aRelativeError Relative error to stop computation
/// @param[in] aStopIfBigger If true stop computation as soon as value
/// is
/// over aThreshold
/// @param[in] aThreshold The threshold at which the maximization
/// should
/// be stopped
/// @param[in] aMaxIterations Maximum number of iterations for the
/// @param[in] aModel The pointer to the hypothesis class that will
/// be used
/// @param[in] aTrace Trace or not the optimizer progress
/// @param[in] aVerbose The verbose level
/// @param[in] aLowerBound Lower limit of the variables to
/// constrain the interval on which the optimum should be computed
/// @param[in] aUpperBound Upper limit of the variables to
/// constrain the interval on which the optimum should be computed
/// @param[in] aDeltaForGradient Delta used to compute the gradient
/// @param[in] aRelativeError Relative error to stop computation
/// @param[in] aStopIfBigger If true stop computation as soon as
/// value is over aThreshol
/// @param[in] aThreshold The threshold at which the maximization
/// should be stopped
/// @param[in] aMaxIterations Maximum number of iterations for the
/// maximization
///
Ming2
(
BranchSiteModel
*
aModel
,
bool
aTrace
,
unsigned
int
aVerbose
,
...
...
CodonFrequencies.cpp
View file @
a7c7aee6
...
...
@@ -22,7 +22,7 @@ CodonFrequencies *CodonFrequencies::getInstance(void) {
}
void
CodonFrequencies
::
setCodonFrequencies
(
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
aCodons
,
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
aCodons
,
CodonFrequencyModel
aModel
,
bool
aShowMessages
)
{
// Compute mCodonFrequencies based on the selected model
if
(
aModel
==
CODON_FREQ_MODEL_F3X4
)
{
...
...
@@ -106,7 +106,7 @@ void CodonFrequencies::setCodonFrequencies(
}
void
CodonFrequencies
::
updateCodonCount
(
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
aCodons
,
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
aCodons
,
std
::
vector
<
double
>
&
aCodonCount
)
const
{
// Zero the count array
aCodonCount
.
assign
(
N
,
0.
);
...
...
CodonFrequencies.h
View file @
a7c7aee6
...
...
@@ -45,7 +45,7 @@ public:
/// @exception FastCodeMLFatal If invalid codon frequency model requested
///
void
setCodonFrequencies
(
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
aCodons
,
setCodonFrequencies
(
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
aCodons
,
CodonFrequencyModel
aModel
,
bool
aShowMessages
);
/// Return a pointer to the codon frequencies array
...
...
@@ -106,7 +106,7 @@ private:
/// @param[in] aCodons Codon positions and multiplicity.
/// @param[in,out] aCodonCount The count of each codon occurrences.
///
void
updateCodonCount
(
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
aCodons
,
void
updateCodonCount
(
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
aCodons
,
std
::
vector
<
double
>
&
aCodonCount
)
const
;
/// Convert the codon number in the 1 to 64 range to 1 to 61
...
...
DAGScheduler.cpp
View file @
a7c7aee6
...
...
@@ -62,7 +62,7 @@ void DAGScheduler::dumpDAG(std::ostream &aOut) const {
aOut
<<
'#'
<<
std
::
endl
;
// Then output all edges
std
::
vector
<
std
::
pair
<
const
void
*
,
const
void
*>>::
const_iterator
ied
=
std
::
vector
<
std
::
pair
<
const
void
*
,
const
void
*>
>::
const_iterator
ied
=
mEdges
.
begin
();
for
(;
ied
!=
mEdges
.
end
();
++
ied
)
{
aOut
<<
ied
->
first
<<
' '
<<
ied
->
second
<<
std
::
endl
;
...
...
DAGScheduler.h
View file @
a7c7aee6
...
...
@@ -67,7 +67,8 @@ public:
private:
std
::
set
<
const
void
*>
mNodes
;
///< Load the distinct node addresses
std
::
vector
<
std
::
pair
<
const
void
*
,
const
void
*>>
mEdges
;
///< Load the edges
std
::
vector
<
std
::
pair
<
const
void
*
,
const
void
*>
>
mEdges
;
///< Load the edges
std
::
map
<
const
void
*
,
int
>
mRefCounter
;
///< Reference counter
std
::
map
<
const
void
*
,
int
>
mRefCounterSave
;
///< Save the reference counter map
...
...
FatVectorTransform.cpp
View file @
a7c7aee6
...
...
@@ -14,12 +14,12 @@
#endif
void
FatVectorTransform
::
setBranchDependencies
(
const
std
::
vector
<
std
::
vector
<
ForestNode
*>>
&
aNodesByLevel
)
{
const
std
::
vector
<
std
::
vector
<
ForestNode
*>
>
&
aNodesByLevel
)
{
// Push only the branch id's (and compute num branches). The root is not
// pushed!
mNumBranches
=
0
;
mBranchByLevel
.
clear
();
std
::
vector
<
std
::
vector
<
ForestNode
*>>::
const_reverse_iterator
inbl
;
std
::
vector
<
std
::
vector
<
ForestNode
*>
>::
const_reverse_iterator
inbl
;
for
(
inbl
=
aNodesByLevel
.
rbegin
();
inbl
!=
aNodesByLevel
.
rend
();
++
inbl
)
{
std
::
vector
<
unsigned
int
>
v
;
std
::
vector
<
ForestNode
*>::
const_iterator
ifn
=
inbl
->
begin
();
...
...
@@ -96,9 +96,9 @@ void FatVectorTransform::printBranchVisitSequence(void) const {
std
::
cout
<<
std
::
endl
<<
"Branch at level"
<<
std
::
endl
;
unsigned
int
level
=
1
;
std
::
vector
<
std
::
vector
<
unsigned
int
>>::
const_iterator
inbl
=
std
::
vector
<
std
::
vector
<
unsigned
int
>
>::
const_iterator
inbl
=
mBranchByLevel
.
begin
();
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>::
const_iterator
end
=
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>::
const_iterator
end
=
mBranchByLevel
.
end
();
for
(;
inbl
!=
end
;
++
inbl
,
++
level
)
{
std
::
cout
<<
level
<<
": "
;
...
...
FatVectorTransform.h
View file @
a7c7aee6
...
...
@@ -37,7 +37,7 @@ public:
/// level
///
void
setBranchDependencies
(
const
std
::
vector
<
std
::
vector
<
ForestNode
*>>
&
aNodesByLevel
);
const
std
::
vector
<
std
::
vector
<
ForestNode
*>
>
&
aNodesByLevel
);
/// Initialize the class instance
///
...
...
@@ -212,7 +212,7 @@ private:
/// position, to position)
typedef
std
::
vector
<
VectorOfRangesNoCnt
>
VectorOfVectorOfRangesNoCnt
;
///< Vector of vectors of single item copies
typedef
std
::
vector
<
std
::
pair
<
size_t
,
size_t
>>
typedef
std
::
vector
<
std
::
pair
<
size_t
,
size_t
>
>
VectorOfPairs
;
///< Vector of pairs of values
VectorOfPairs
mLimits
;
///< Lower index and total count for each branch
...
...
@@ -225,7 +225,7 @@ private:
/// is the first entry for its level
bool
mNoTransformations
;
///< If set no transformation will take place
///(corresponds to no tree prune case)
std
::
vector
<
std
::
vector
<
unsigned
int
>>
mBranchByLevel
;
///< Each level
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
mBranchByLevel
;
///< Each level
/// contains a list of
/// branch numbers at
/// this level. List
...
...
Forest.cpp
View file @
a7c7aee6
...
...
@@ -44,7 +44,7 @@ void Forest::loadTreeAndGenes(
const
std
::
vector
<
unsigned
int
>
&
mult
=
aGenes
.
getSiteMultiplicity
();
// Initialize the codon info list
std
::
vector
<
std
::
vector
<
unsigned
int
>>
codons_info
;
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
codons_info
;
codons_info
.
reserve
(
mNumSites
*
aGenes
.
getNumSpecies
());
// Initialize the array of all probability vectors to be all zeros
...
...
@@ -208,9 +208,9 @@ void Forest::postLoad(void) {
unsigned
int
max_level
=
0
;
unsigned
int
max_leaf
=
0
;
unsigned
int
level
=
0
;
std
::
vector
<
std
::
vector
<
ForestNode
*>>::
iterator
inbl
(
std
::
vector
<
std
::
vector
<
ForestNode
*>
>::
iterator
inbl
(
mNodesByLevel
.
begin
());
const
std
::
vector
<
std
::
vector
<
ForestNode
*>>::
iterator
end
(
const
std
::
vector
<
std
::
vector
<
ForestNode
*>
>::
iterator
end
(
mNodesByLevel
.
end
());
for
(
level
=
0
;
inbl
!=
end
;
++
inbl
,
++
level
)
{
unsigned
int
num_leaves
=
0
;
...
...
@@ -532,7 +532,7 @@ void Forest::computeLikelihoods(const ProbabilityMatrixSet &aSet,
// For each level of the tree (except the root)
unsigned
int
level
=
0
;
std
::
vector
<
std
::
vector
<
ForestNode
*>>::
reverse_iterator
inbl
;
std
::
vector
<
std
::
vector
<
ForestNode
*>
>::
reverse_iterator
inbl
;
for
(
inbl
=
mNodesByLevel
.
rbegin
();
inbl
!=
mNodesByLevel
.
rend
();
++
inbl
,
++
level
)
{
const
int
num_sites
=
static_cast
<
int
>
(
inbl
->
size
());
...
...
Forest.h
View file @
a7c7aee6
...
...
@@ -286,7 +286,7 @@ public:
///
/// @return List of lists of dependencies
///
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
getTreeDependencies
(
void
)
const
{
return
mTreeDependencies
;
}
...
...
@@ -296,7 +296,7 @@ public:
///
/// @return List of lists of reverse dependencies
///
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
getTreeRevDependencies
(
void
)
const
{
return
mTreeRevDependencies
;
}
...
...
@@ -415,7 +415,8 @@ private:
/// classes
CacheAlignedDoubleVector
mProbsOut
;
///< mProbs after multiplication by exp(Qt)
std
::
vector
<
std
::
vector
<
ForestNode
*>>
mNodesByLevel
;
///< Each level contains
std
::
vector
<
std
::
vector
<
ForestNode
*>
>
mNodesByLevel
;
///< Each level contains
/// a list of pointers to
/// nodes at this level.
/// List start from the
...
...
@@ -426,23 +427,23 @@ private:
#else
/// Unified array for each branch probability vector
CacheAlignedDoubleVector
mProbs
;
///< The concatenation of all the probability
/// vectors for all the nodes and all the
/// classes
/// vectors for all the nodes and all the
/// classes
#endif
std
::
vector
<
std
::
vector
<
unsigned
int
>>
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
mTreeDependencies
;
///< mTreeDependencies[tj] = [t1 t2 t3] means: tj can
/// be done after: t1 t2 t3
std
::
vector
<
std
::
vector
<
unsigned
int
>>
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
mTreeRevDependencies
;
///< mTreeRevDependencies[tj] = [t1 t2 t3] means: tj
/// should be ready before: t1 t2 t3
#ifdef NON_RECURSIVE_VISIT
std
::
vector
<
std
::
vector
<
ForestNode
*>>
mVisitTree
;
///< List of pointers to
std
::
vector
<
std
::
vector
<
ForestNode
*>
>
mVisitTree
;
///< List of pointers to
/// tree nodes (a list per
/// site) in the
/// non-recursive visit
/// order
std
::
vector
<
std
::
vector
<
ForestNode
*>>
mVisitTreeParents
;
///< List of parent
std
::
vector
<
std
::
vector
<
ForestNode
*>
>
mVisitTreeParents
;
///< List of parent
/// pointers for the
/// corresponding
/// nodes in the
...
...
ForestExport.cpp
View file @
a7c7aee6
...
...
@@ -10,8 +10,8 @@
#include
"Forest.h"
void
ForestExport
::
exportForest
(
const
char
*
aFilename
,
size_t
aCounter
)
const
{
std
::
vector
<
std
::
pair
<
int
,
int
>>
node_from
;
std
::
vector
<
std
::
pair
<
int
,
int
>>
node_to
;
std
::
vector
<
std
::
pair
<
int
,
int
>
>
node_from
;
std
::
vector
<
std
::
pair
<
int
,
int
>
>
node_to
;
std
::
vector
<
double
>
branch_length
;
// Get all forest connections
...
...
@@ -22,8 +22,8 @@ void ForestExport::exportForest(const char *aFilename, size_t aCounter) const {
}
// Remove duplicated nodes
std
::
set
<
std
::
pair
<
int
,
int
>>
vertices
;
std
::
vector
<
std
::
pair
<
int
,
int
>>::
const_iterator
ip
=
node_from
.
begin
();
std
::
set
<
std
::
pair
<
int
,
int
>
>
vertices
;
std
::
vector
<
std
::
pair
<
int
,
int
>
>::
const_iterator
ip
=
node_from
.
begin
();
for
(;
ip
!=
node_from
.
end
();
++
ip
)
vertices
.
insert
(
*
ip
);
for
(
ip
=
node_to
.
begin
();
ip
!=
node_to
.
end
();
++
ip
)
...
...
@@ -32,7 +32,7 @@ void ForestExport::exportForest(const char *aFilename, size_t aCounter) const {
// Convert to node indices
std
::
map
<
std
::
pair
<
int
,
int
>
,
int
>
map
;
int
idx
;
std
::
set
<
std
::
pair
<
int
,
int
>>::
const_iterator
iv
=
vertices
.
begin
();
std
::
set
<
std
::
pair
<
int
,
int
>
>::
const_iterator
iv
=
vertices
.
begin
();
for
(
idx
=
1
;
iv
!=
vertices
.
end
();
++
iv
,
++
idx
)
{
std
::
pair
<
int
,
int
>
p
(
iv
->
first
,
iv
->
second
);
map
[
p
]
=
idx
;
...
...
@@ -106,8 +106,8 @@ void ForestExport::exportForest(const char *aFilename, size_t aCounter) const {
void
ForestExport
::
exportForestWalker
(
const
ForestNode
*
aNode
,
const
std
::
vector
<
double
>
&
aBranchLengths
,
std
::
vector
<
std
::
pair
<
int
,
int
>>
&
aNodeFrom
,
std
::
vector
<
std
::
pair
<
int
,
int
>>
&
aNodeTo
,
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
aNodeFrom
,
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
aNodeTo
,
std
::
vector
<
double
>
&
aLength
)
const
{
int
my_node_id
=
aNode
->
mBranchId
+
1
;
int
my_tree_id
=
aNode
->
mOwnTree
;
...
...
ForestExport.h
View file @
a7c7aee6
...
...
@@ -42,8 +42,8 @@ private:
///
void
exportForestWalker
(
const
ForestNode
*
aNode
,
const
std
::
vector
<
double
>
&
aBranchLengths
,
std
::
vector
<
std
::
pair
<
int
,
int
>>
&
aNodeFrom
,
std
::
vector
<
std
::
pair
<
int
,
int
>>
&
aNodeTo
,
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
aNodeFrom
,
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
aNodeTo
,
std
::
vector
<
double
>
&
aLength
)
const
;
/// Disabled assignment operator to avoid warnings on Windows.
...
...
Genes.cpp
View file @
a7c7aee6
...
...
@@ -91,7 +91,7 @@ void Genes::setLeaveProb(double *aLeaveProbVect) const {
}
}
void
Genes
::
saveCodonsForCount
(
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
aCodons
,
void
Genes
::
saveCodonsForCount
(
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
aCodons
,
unsigned
int
aSiteMultiplicity
)
const
{
// Check if valid translation of the codon
size_t
cnt
=
mCurrentPositions
.
size
();
...
...
@@ -436,7 +436,7 @@ void Genes::initFullCodonMap(void) {
// This is a valid, possibly ambiguous codon
if
(
valid
)
{
mMapCodonToPosition
.
insert
(
std
::
pair
<
std
::
string
,
std
::
vector
<
int
>>
(
mMapCodonToPosition
.
insert
(
std
::
pair
<
std
::
string
,
std
::
vector
<
int
>
>
(
std
::
string
(
codona
),
pos
));
}
}
...
...
@@ -468,7 +468,7 @@ const std::vector<int> &Genes::getPositions(const char *aCodon) const {
codon
[
3
]
=
'\0'
;
// Check if it is in the list of valid codons
std
::
map
<
std
::
string
,
std
::
vector
<
int
>>::
const_iterator
im
(
std
::
map
<
std
::
string
,
std
::
vector
<
int
>
>::
const_iterator
im
(
mMapCodonToPosition
.
find
(
std
::
string
(
codon
)));
// If no, return an empty list, else return the list of corresponding
...
...
Genes.h
View file @
a7c7aee6
...
...
@@ -84,7 +84,7 @@ public:
///
/// @exception FastCodeMLFatal If saved codon is invalid.
///
void
saveCodonsForCount
(
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
aCodons
,
void
saveCodonsForCount
(
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
aCodons
,
unsigned
int
aSiteMultiplicity
)
const
;
/// Check coherence between tree and genes.
...
...
@@ -181,26 +181,17 @@ private:
std
::
vector
<
std
::
string
>
mDnaSpecies
;
///< The list of species labels
std
::
vector
<
std
::
string
>
mDnaGene
;
///< The gene DNA basis strings
std
::
vector
<
unsigned
int
>
mSiteMultiplicity
;
///< Site multiplicity (sites
/// with multiplicity of zero has
/// been removed from the site
/// list)
/// with multiplicity of zero has been removed from the site list)
std
::
vector
<
unsigned
int
>
mMapSiteToDnaGene
;
///< Map the site number to the position in mDnaGene
std
::
map
<
std
::
string
,
unsigned
int
>
mMapSpecieToDnaGene
;
///< Map specie name
/// to position in the
/// gene list mDnaGene
/// to position in the gene list mDnaGene
std
::
multimap
<
size_t
,
size_t
>
mSitesMappingToOriginal
;
///< Map reduced site
/// num. to list of
/// corresponding
/// original sites
/// num. to list of corresponding original sites
size_t
mOriginalNumSites
;
///< Original number of sites (before cleaning)
std
::
map
<
std
::
string
,
std
::
vector
<
int
>>
mMapCodonToPosition
;
///< Map codons
///(including
/// ambiguous
/// ones) to
/// positions on
/// the CPV
std
::
map
<
std
::
string
,
std
::
vector
<
int
>
>
mMapCodonToPosition
;
///< Map codons
///(including ambiguous ones) to positions on the CPV
std
::
vector
<
int
>
mEmptyVector
;
///< Empty vector to be returned if no position available
mutable
std
::
vector
<
int
>
...
...
HighLevelCoordinator.cpp
View file @
a7c7aee6
...
...
@@ -99,9 +99,8 @@ struct HighLevelCoordinator::WorkTable {
///
/// @param[out] aJob The job request: [0] is set to the kind of job (JOB_H0,
/// JOB_H1, JOB_BEB, JOB_SHUTDOWN);
/// [1] to the fg branch number (or zero
///for
/// JOB_SHUTDOWN);
/// [1] to the fg branch number (or zero
/// for JOB_SHUTDOWN);
/// [2] zero or the number of variables for
/// a JOB_BEB or JOB_H0 requests
/// @param[in] aRank The current worker rank
...
...
NewickGrammar.h
View file @
a7c7aee6
...
...
@@ -45,16 +45,16 @@ struct NewickGrammar : public grammar<NewickGrammar> {
marker
=
leaf_node_d
[
+
alnum_p
];
}
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
treeID
>>
tree
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
nodelistID
>>
nodelist
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
subtreeID
>>
subtree
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
fulllabelID
>>
full_label
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
branchlenID
>>
branch_length
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
cblenID
>>
colon_plus_len
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
labelID
>>
label
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
markerID
>>
marker
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
treeID
>>
const
&
start
()
const
{
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
treeID
>
>
tree
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
nodelistID
>
>
nodelist
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
subtreeID
>
>
subtree
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
fulllabelID
>
>
full_label
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
branchlenID
>
>
branch_length
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
cblenID
>
>
colon_plus_len
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
labelID
>
>
label
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
markerID
>
>
marker
;
rule
<
ScannerT
,
parser_context
<>
,
parser_tag
<
treeID
>
>
const
&
start
()
const
{
return
tree
;
}
};
...
...
TreeAndSetsDependencies.cpp
View file @
a7c7aee6
...
...
@@ -33,11 +33,11 @@ void TreeAndSetsDependencies::computeDependencies(unsigned int aNumSets,
// Take values from forest
size_t
num_sites
=
mForest
.
getNumSites
();
std
::
vector
<
std
::
vector
<
unsigned
int
>>
tree_dependencies
=
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
tree_dependencies
=
mForest
.
getTreeDependencies
();
// Collect the class dependencies
std
::
vector
<
std
::
vector
<
unsigned
int
>>
tree_groups_dependencies
;
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
tree_groups_dependencies
;
// If no dependencies
if
(
aNoParallel
)
{
...
...
@@ -219,7 +219,7 @@ bool TreeAndSetsDependencies::balanceDependenciesClassesAndTrees(bool aGreedy) {
if
(
mNoParallel
)
return
false
;
const
std
::
vector
<
std
::
vector
<
unsigned
int
>>
&
tree_rev_dependencies
=
const
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
&
tree_rev_dependencies
=
mForest
.
getTreeRevDependencies
();
// At each level collect the 'jolly' threads (trees that are not preconditions
...
...
TreeAndSetsDependencies.h
View file @
a7c7aee6
...
...
@@ -4,7 +4,7 @@
/// List (each list depends on the previous) of list (sites to be executed in
/// parallel) of pairs (site, site class) stored as site*4+site_class
typedef
std
::
vector
<
std
::
vector
<
unsigned
int
>>
ListDependencies
;
typedef
std
::
vector
<
std
::
vector
<
unsigned
int
>
>
ListDependencies
;
#include
"Forest.h"
...
...
Types.h
View file @
a7c7aee6
...
...
@@ -8,12 +8,12 @@
/// Array of doubles aligned on a cache line
///
typedef
std
::
vector
<
double
,
AlignedAllocator
<
double
,
CACHE_LINE_ALIGN
>>
typedef
std
::
vector
<
double
,
AlignedAllocator
<
double
,
CACHE_LINE_ALIGN
>
>
CacheAlignedDoubleVector
;
/// Array of doubles to be used by SSE instructions
///
typedef
std
::
vector
<
double
,
AlignedAllocator
<
double
,
16
>>
typedef
std
::
vector
<
double
,
AlignedAllocator
<
double
,
16
>
>
SSEAlignedDoubleVector
;
#endif
WriteResults.cpp
View file @
a7c7aee6
...
...
@@ -84,7 +84,7 @@ void WriteResults::outputResults(void) {
// they start from 1 and not zero)
for
(
size_t
branch
=
min_branch
;
branch
<=
max_branch
;
++
branch
)
{
std
::
map
<
size_t
,
std
::
pair
<
std
::
vector
<
unsigned
int
>
,
std
::
vector
<
double
>
>
>::
const_iterator
ipss
;
std
::
vector
<
double
>
>
>::
const_iterator
ipss
;
ipss
=
mPositiveSelSites
.
find
(
branch
);
if
(
ipss
!=
mPositiveSelSites
.
end
())
{
const
std
::
vector
<
unsigned
int
>
&
site
=
ipss
->
second
.
first
;
...
...
Prev
1
2
Next
Iakov Davydov
@idavydov
mentioned in commit
8386c1b1
·
Dec 03, 2015
mentioned in commit
8386c1b1
mentioned in commit 8386c1b128e76010f9ca51ff4c5c6f48934b0f04
Toggle commit list
Iakov Davydov
@idavydov
mentioned in issue
#25 (closed)
·
Dec 03, 2015
mentioned in issue
#25 (closed)
mentioned in issue #25
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment