search for: max_element

Displaying 8 results from an estimated 8 matches for "max_element".

2015 Jan 29
0
[LLVMdev] PBQP crash
...overlap. Bug 2: When it happens that there are no available physical registers for a node (e.g because of regmasks or calls), the number of rows / columns is just 1, for the spill option. This case must be detected in MatrixMetadata(), or WorstColCountForCurRow will get an undefined value, as std::max_element() is called with an empty vector. Bug 3: Again a conservatively allocatable node was spilled, and the assert triggered. This is a description of what happened in my out-of-tree test case: applyR2() called on node N, which is overlapping Y and Z. The edges (N,Y) and (N,Z) are all-zeroes. Y and Z a...
2015 Jan 30
0
[LLVMdev] PBQP crash
...n it happens that there are no available physical registers for > a node (e.g because of regmasks or calls), the number of rows / columns is > just 1, for the spill option. This case must be detected in > MatrixMetadata(), or WorstColCountForCurRow will get an undefined value, as > std::max_element() is called with an empty vector. > > > > Bug 3: Again a conservatively allocatable node was spilled, and the assert > triggered. This is a description of what happened in my out-of-tree test > case: > > > > applyR2() called on node N, which is overlapping Y and Z. The...
2015 Jan 27
5
[LLVMdev] PBQP crash
> A node should never be put into the conservatively allocatable list if there is a chance of it spilling. I can understand why the logic of NodeMetadata::isConservativelyAllocatable is necessary for the node to be allocatable, but I have not been able to convince myself this is sufficient, especially when the node degree > available registers. Cheers, Arnaud From:
2010 Mar 14
1
Segfault Problem c++ R interface (detailed)
...utMaxRegenDepth, lMaxDepth); applyMutationSwap(lPopulation, lContext, lMutSwapProba, lMutSwapDistribProba); evaluateSymbReg(lPopulation, lContext, lX, lF); calculateStats(lPopulation, i); } // Output best individual std::vector<Tree>::const_iterator lBestIndividual = std::max_element(lPopulation.begin(), lPopulation.end()); Rprintf("Best individual at generation %u is: ", lNbrGen); //Rprintf("%s\n", *lBestIndividual); Rprintf("Exiting program\n"); } /*! * \brief Evaluate fitness of a population * \param ioPopulation Population to evaluat...
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael, On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote: > However, do we need to start with instrumentation? The original paper > uses sampling with good results and current intel cpus can record every > branch in a program. > > I would propose starting with just an lld patch that reads the call > graph from a file. The format would be very similar to
2017 Jul 31
2
[RFC] Profile guided section layout
...ntEdge(Edges, {From, To, C.second}); + Nodes[To].Weight = SaturatingAdd(Nodes[To].Weight, C.second); + } + } + + // Collapse the graph. + while (!Edges.empty()) { + // Find the largest edge + // FIXME: non deterministic order for equal edges. + // FIXME: n^2 + auto Max = std::max_element( + Edges.begin(), Edges.end(), + [](const Edge A, const Edge B) { return A.Weight < B.Weight; }); + const Edge MaxE = *Max; + Edges.erase(Max); + // Merge the Nodes. + Node &From = Nodes[MaxE.From]; + Node &To = Nodes[MaxE.To]; + if (From.Size + To.Size &g...
2017 Jun 15
7
[RFC] Profile guided section layout
...ntEdge(Edges, {From, To, C.second}); + Nodes[To].Weight = SaturatingAdd(Nodes[To].Weight, C.second); + } + } + + // Collapse the graph. + while (!Edges.empty()) { + // Find the largest edge + // FIXME: non deterministic order for equal edges. + // FIXME: n^2 + auto Max = std::max_element( + Edges.begin(), Edges.end(), + [](const Edge A, const Edge B) { return A.Weight < B.Weight; }); + const Edge MaxE = *Max; + Edges.erase(Max); + // Merge the Nodes. + Node &From = Nodes[MaxE.From]; + Node &To = Nodes[MaxE.To]; + if (From.Size + To.Size &g...
2017 Aug 01
2
[RFC] Profile guided section layout
...ntEdge(Edges, {From, To, C.second}); + Nodes[To].Weight = SaturatingAdd(Nodes[To].Weight, C.second); + } + } + + // Collapse the graph. + while (!Edges.empty()) { + // Find the largest edge + // FIXME: non deterministic order for equal edges. + // FIXME: n^2 + auto Max = std::max_element( + Edges.begin(), Edges.end(), + [](const Edge A, const Edge B) { return A.Weight < B.Weight; }); + const Edge MaxE = *Max; + Edges.erase(Max); + // Merge the Nodes. + Node &From = Nodes[MaxE.From]; + Node &To = Nodes[MaxE.To]; + if (From.Size + To.Size &g...