/** * the iteration head prepares the backchannel: it allocates memory, instantiates a {@link BlockingBackChannel} and * hands it to the iteration tail via a {@link Broker} singleton **/ private BlockingBackChannel initBackChannel() throws Exception { /* get the size of the memory available to the backchannel */ int backChannelMemoryPages = getMemoryManager().computeNumberOfPages(this.config.getRelativeBackChannelMemory()); /* allocate the memory available to the backchannel */ List<MemorySegment> segments = new ArrayList<MemorySegment>(); int segmentSize = getMemoryManager().getPageSize(); getMemoryManager().allocatePages(this, segments, backChannelMemoryPages); /* instantiate the backchannel */ BlockingBackChannel backChannel = new BlockingBackChannel(new SerializedUpdateBuffer(segments, segmentSize, getIOManager())); /* hand the backchannel over to the iteration tail */ Broker<BlockingBackChannel> broker = BlockingBackChannelBroker.instance(); broker.handIn(brokerKey(), backChannel); return backChannel; }
/** * The iteration head prepares the backchannel: it allocates memory, instantiates a {@link BlockingBackChannel} and * hands it to the iteration tail via a {@link Broker} singleton. **/ private BlockingBackChannel initBackChannel() throws Exception { /* get the size of the memory available to the backchannel */ int backChannelMemoryPages = getMemoryManager().computeNumberOfPages(this.config.getRelativeBackChannelMemory()); /* allocate the memory available to the backchannel */ List<MemorySegment> segments = new ArrayList<MemorySegment>(); int segmentSize = getMemoryManager().getPageSize(); getMemoryManager().allocatePages(this, segments, backChannelMemoryPages); /* instantiate the backchannel */ BlockingBackChannel backChannel = new BlockingBackChannel(new SerializedUpdateBuffer(segments, segmentSize, getIOManager())); /* hand the backchannel over to the iteration tail */ Broker<BlockingBackChannel> broker = BlockingBackChannelBroker.instance(); broker.handIn(brokerKey(), backChannel); return backChannel; }
/** * The iteration head prepares the backchannel: it allocates memory, instantiates a {@link BlockingBackChannel} and * hands it to the iteration tail via a {@link Broker} singleton. **/ private BlockingBackChannel initBackChannel() throws Exception { /* get the size of the memory available to the backchannel */ int backChannelMemoryPages = getMemoryManager().computeNumberOfPages(this.config.getRelativeBackChannelMemory()); /* allocate the memory available to the backchannel */ List<MemorySegment> segments = new ArrayList<MemorySegment>(); int segmentSize = getMemoryManager().getPageSize(); getMemoryManager().allocatePages(this, segments, backChannelMemoryPages); /* instantiate the backchannel */ BlockingBackChannel backChannel = new BlockingBackChannel(new SerializedUpdateBuffer(segments, segmentSize, getIOManager())); /* hand the backchannel over to the iteration tail */ Broker<BlockingBackChannel> broker = BlockingBackChannelBroker.instance(); broker.handIn(brokerKey(), backChannel); return backChannel; }
/** * The iteration head prepares the backchannel: it allocates memory, instantiates a {@link BlockingBackChannel} and * hands it to the iteration tail via a {@link Broker} singleton. **/ private BlockingBackChannel initBackChannel() throws Exception { /* get the size of the memory available to the backchannel */ int backChannelMemoryPages = getMemoryManager().computeNumberOfPages(this.config.getRelativeBackChannelMemory()); /* allocate the memory available to the backchannel */ List<MemorySegment> segments = new ArrayList<MemorySegment>(); int segmentSize = getMemoryManager().getPageSize(); getMemoryManager().allocatePages(this, segments, backChannelMemoryPages); /* instantiate the backchannel */ BlockingBackChannel backChannel = new BlockingBackChannel(new SerializedUpdateBuffer(segments, segmentSize, getIOManager())); /* hand the backchannel over to the iteration tail */ Broker<BlockingBackChannel> broker = BlockingBackChannelBroker.instance(); broker.handIn(brokerKey(), backChannel); return backChannel; }
@Override protected void initialize() throws Exception { super.initialize(); // check if the driver is resettable if (this.driver instanceof ResettableDriver) { final ResettableDriver<?, ?> resDriver = (ResettableDriver<?, ?>) this.driver; // make sure that the according inputs are not reset for (int i = 0; i < resDriver.getNumberOfInputs(); i++) { if (resDriver.isInputResettable(i)) { excludeFromReset(i); } } } TaskConfig config = getLastTasksConfig(); isWorksetIteration = config.getIsWorksetIteration(); isWorksetUpdate = config.getIsWorksetUpdate(); isSolutionSetUpdate = config.getIsSolutionSetUpdate(); if (isWorksetUpdate) { worksetBackChannel = BlockingBackChannelBroker.instance().getAndRemove(brokerKey()); if (isWorksetIteration) { worksetAggregator = getIterationAggregators().getAggregator(WorksetEmptyConvergenceCriterion.AGGREGATOR_NAME); if (worksetAggregator == null) { throw new RuntimeException("Missing workset elements count aggregator."); } } } }
@Override protected void initialize() throws Exception { super.initialize(); // check if the driver is resettable if (this.driver instanceof ResettableDriver) { final ResettableDriver<?, ?> resDriver = (ResettableDriver<?, ?>) this.driver; // make sure that the according inputs are not reseted for (int i = 0; i < resDriver.getNumberOfInputs(); i++) { if (resDriver.isInputResettable(i)) { excludeFromReset(i); } } } TaskConfig config = getLastTasksConfig(); isWorksetIteration = config.getIsWorksetIteration(); isWorksetUpdate = config.getIsWorksetUpdate(); isSolutionSetUpdate = config.getIsSolutionSetUpdate(); if (isWorksetUpdate) { worksetBackChannel = BlockingBackChannelBroker.instance().getAndRemove(brokerKey()); if (isWorksetIteration) { worksetAggregator = getIterationAggregators().getAggregator(WorksetEmptyConvergenceCriterion.AGGREGATOR_NAME); if (worksetAggregator == null) { throw new RuntimeException("Missing workset elements count aggregator."); } } } }
@Override protected void initialize() throws Exception { super.initialize(); // check if the driver is resettable if (this.driver instanceof ResettableDriver) { final ResettableDriver<?, ?> resDriver = (ResettableDriver<?, ?>) this.driver; // make sure that the according inputs are not reset for (int i = 0; i < resDriver.getNumberOfInputs(); i++) { if (resDriver.isInputResettable(i)) { excludeFromReset(i); } } } TaskConfig config = getLastTasksConfig(); isWorksetIteration = config.getIsWorksetIteration(); isWorksetUpdate = config.getIsWorksetUpdate(); isSolutionSetUpdate = config.getIsSolutionSetUpdate(); if (isWorksetUpdate) { worksetBackChannel = BlockingBackChannelBroker.instance().getAndRemove(brokerKey()); if (isWorksetIteration) { worksetAggregator = getIterationAggregators().getAggregator(WorksetEmptyConvergenceCriterion.AGGREGATOR_NAME); if (worksetAggregator == null) { throw new RuntimeException("Missing workset elements count aggregator."); } } } }
@Override protected void initialize() throws Exception { super.initialize(); // check if the driver is resettable if (this.driver instanceof ResettableDriver) { final ResettableDriver<?, ?> resDriver = (ResettableDriver<?, ?>) this.driver; // make sure that the according inputs are not reset for (int i = 0; i < resDriver.getNumberOfInputs(); i++) { if (resDriver.isInputResettable(i)) { excludeFromReset(i); } } } TaskConfig config = getLastTasksConfig(); isWorksetIteration = config.getIsWorksetIteration(); isWorksetUpdate = config.getIsWorksetUpdate(); isSolutionSetUpdate = config.getIsSolutionSetUpdate(); if (isWorksetUpdate) { worksetBackChannel = BlockingBackChannelBroker.instance().getAndRemove(brokerKey()); if (isWorksetIteration) { worksetAggregator = getIterationAggregators().getAggregator(WorksetEmptyConvergenceCriterion.AGGREGATOR_NAME); if (worksetAggregator == null) { throw new RuntimeException("Missing workset elements count aggregator."); } } } }
BlockingBackChannelBroker.instance().remove(brokerKey); SuperstepKickoffLatchBroker.instance().remove(brokerKey); SolutionSetBroker.instance().remove(brokerKey);
BlockingBackChannelBroker.instance().remove(brokerKey); SuperstepKickoffLatchBroker.instance().remove(brokerKey); SolutionSetBroker.instance().remove(brokerKey);
BlockingBackChannelBroker.instance().remove(brokerKey); SuperstepKickoffLatchBroker.instance().remove(brokerKey); SolutionSetBroker.instance().remove(brokerKey);
BlockingBackChannelBroker.instance().remove(brokerKey); SuperstepKickoffLatchBroker.instance().remove(brokerKey); SolutionSetBroker.instance().remove(brokerKey);