private Graph buildInterferenceGraph(List<Map<Instruction, BitSet>> liveInInformation, Program program) { GraphBuilder builder = new GraphBuilder(program.variableCount()); for (Map<Instruction, BitSet> blockLiveIn : liveInInformation) { for (BitSet liveVarsSet : blockLiveIn.values()) { IntArrayList liveVars = new IntArrayList(); for (int i = liveVarsSet.nextSetBit(0); i >= 0; i = liveVarsSet.nextSetBit(i + 1)) { liveVars.add(i); } int[] liveVarArray = liveVars.toArray(); for (int i = 0; i < liveVarArray.length - 1; ++i) { for (int j = i + 1; j < liveVarArray.length; ++j) { builder.addEdge(liveVarArray[i], liveVarArray[j]); builder.addEdge(liveVarArray[j], liveVarArray[i]); } } } } return builder.build(); }
initEntries(tmpEntries.toArray()); int shiftSum = 0; long parts = 1;
gtfsStorage.getBoardEdgesForTrip().put(GtfsStorage.tripKey(tripDescriptor, frequencyBased), boardEdges.toArray()); gtfsStorage.getAlightEdgesForTrip().put(GtfsStorage.tripKey(tripDescriptor, frequencyBased), alightEdges.toArray()); TripWithStopTimeAndArrivalNode tripWithStopTimeAndArrivalNode = new TripWithStopTimeAndArrivalNode(); tripWithStopTimeAndArrivalNode.tripWithStopTimes = trip;
/** * Trim the internal buffer to the current size. */ public void trimToSize() { if (size() != this.buffer.length) { this.buffer = toArray(); } }
public int[] ports() throws NumberFormatException { final IntArrayList ports = new IntArrayList(); iterate(new PortCallback() { @Override public boolean onPortNumber(int portNumber) { ports.add(portNumber); return false; } }); return ports.toArray(); }
/** * Returns all feature indices. * @return all feature indices. */ public int[] getIndices() { return i_indices.toArray(); }
/** * Returns all feature indices. * @return all feature indices. */ public int[] getIndices() { return i_indices.toArray(); }
/** * Returns all feature indices. * @return all feature indices. */ public int[] getIndices() { return i_indices.toArray(); }
public TypedFieldId(CompleteType type, IntArrayList breadCrumb, PathSegment remainder) { this(type, type, type, false, remainder, breadCrumb.toArray()); }
public TypedFieldId(MajorType type, IntArrayList breadCrumb, PathSegment remainder) { this(type, type, type, false, remainder, breadCrumb.toArray()); }
/** * Trim the internal buffer to the current size. */ public void trimToSize() { if (size() != this.buffer.length) { this.buffer = toArray(); } }
public TypedFieldId build() { Preconditions.checkNotNull(intermediateType); Preconditions.checkNotNull(finalType); if (intermediateType == null) { intermediateType = finalType; } if (secondaryFinal == null) { secondaryFinal = finalType; } CompleteType actualFinalType = finalType; //CompleteType secondaryFinal = finalType; // if this has an index, switch to required type for output //if(withIndex && intermediateType == finalType) actualFinalType = finalType.toBuilder().setMode(DataMode.REQUIRED).build(); // if this isn't a direct access, switch the final type to nullable as offsets may be null. // TODO: there is a bug here with some things. //if(intermediateType != finalType) actualFinalType = finalType.toBuilder().setMode(DataMode.OPTIONAL).build(); return new TypedFieldId(intermediateType, secondaryFinal, actualFinalType, hyperReader, isListVector, remainder, ids.toArray()); } }
public int[] ports() throws NumberFormatException { final IntArrayList ports = new IntArrayList(); iterate(new PortCallback() { @Override public boolean onPortNumber(int portNumber) { ports.add(portNumber); return false; } }); return ports.toArray(); }
public int[] ports() throws NumberFormatException { final IntArrayList ports = new IntArrayList(); iterate(new PortCallback() { @Override public boolean onPortNumber(int portNumber) { ports.add(portNumber); return false; } }); return ports.toArray(); }
public int[] ports() throws NumberFormatException { final IntArrayList ports = new IntArrayList(); iterate(new PortCallback() { @Override public boolean onPortNumber(int portNumber) { ports.add(portNumber); return false; } }); return ports.toArray(); }
public int[] ports() throws NumberFormatException { final IntArrayList ports = new IntArrayList(); iterate(new PortCallback() { @Override public boolean onPortNumber(int portNumber) { ports.add(portNumber); return false; } }); return ports.toArray(); }
public TypedFieldId build() { Preconditions.checkNotNull(intermediateType); Preconditions.checkNotNull(finalType); if (intermediateType == null) { intermediateType = finalType; } if (secondaryFinal == null) { secondaryFinal = finalType; } MajorType actualFinalType = finalType; //MajorType secondaryFinal = finalType; // if this has an index, switch to required type for output //if(withIndex && intermediateType == finalType) actualFinalType = finalType.toBuilder().setMode(DataMode.REQUIRED).build(); // if this isn't a direct access, switch the final type to nullable as offsets may be null. // TODO: there is a bug here with some things. //if(intermediateType != finalType) actualFinalType = finalType.toBuilder().setMode(DataMode.OPTIONAL).build(); return new TypedFieldId(intermediateType, secondaryFinal, actualFinalType, hyperReader, isListVector, remainder, ids.toArray()); } }
private Graph buildInterferenceGraph(List<Map<Instruction, BitSet>> liveInInformation, Program program) { GraphBuilder builder = new GraphBuilder(program.variableCount()); for (Map<Instruction, BitSet> blockLiveIn : liveInInformation) { for (BitSet liveVarsSet : blockLiveIn.values()) { IntArrayList liveVars = new IntArrayList(); for (int i = liveVarsSet.nextSetBit(0); i >= 0; i = liveVarsSet.nextSetBit(i + 1)) { liveVars.add(i); } int[] liveVarArray = liveVars.toArray(); for (int i = 0; i < liveVarArray.length - 1; ++i) { for (int j = i + 1; j < liveVarArray.length; ++j) { builder.addEdge(liveVarArray[i], liveVarArray[j]); builder.addEdge(liveVarArray[j], liveVarArray[i]); } } } } return builder.build(); }
int[] lengthArray = lengths.toArray(); for (HugeComputeStep computeStep : computeSteps) { computeStep.setStarts(startArray, lengthArray);
context.allLabels.featureIndex = acceptedFeatures.toArray(); updateFirstPhraseIndex(context);