Fills the target state address of an arc.
496322
private int getArcTarget(int arc) {
    arc += ADDRESS_OFFSET;
    return (data[arc]           ) << 24 | 
           (data[arc + 1] & 0xff) << 16 | 
           (data[arc + 2] & 0xff) << 8  | 
           (data[arc + 3] & 0xff);
  }
774383
function(ctx, x, y, radius, shadow, fill) {
            if (!shadow) {
                ctx.moveTo(x + radius, y);
                ctx.arc(x, y, radius, 0, Math.PI * 2, false);
            }
        }
644100
void transit(State source, Action act, State target)
    {
        int deprel = 0;
        int[] deprel_inference = new int[]{deprel};
        if (ActionUtils.is_shift(act))
        {
            target.shift(source);
        }
        else if (ActionUtils.is_left_arc(act, deprel_inference))
        {
            deprel = deprel_inference[0];
            target.left_arc(source, deprel);
        }
        else if (ActionUtils.is_right_arc(act, deprel_inference))
        {
            deprel = deprel_inference[0];
            target.right_arc(source, deprel);
        }
        else
        {
            System.err.printf("unknown transition in transit: %d-%d", act.name(), act.rel());
        }
    }
279417
def _initilize(self, state: State) -> State:
        """"""

        targets = {}
        for pc, instr in enumerate(self):
            if isinstance(instr, Label):
                targets[instr.target] = pc

        state = state.update({PC: 0,
                              TARGETS: targets,
                              NAMEDGATES: STDGATES.copy()})
        return state
884967
private void fillPropertyMap(Map<String, Set<String>> map, TransformationDescription description) {
        for (TransformationStep step : description.getTransformingSteps()) {
            if (step.getSourceFields() == null) {
                LOGGER.debug("Step {} is ignored since no source properties are defined");
                continue;
            }
            String targetField = step.getTargetField();
            if (!map.containsKey(targetField) && isTemporaryProperty(targetField)) {
                LOGGER.debug("Add new property entry for field {}", targetField);
                map.put(targetField, new HashSet<String>());
            }
            for (String sourceField : step.getSourceFields()) {
                if (sourceField == null) {
                    continue;
                }
                String[] result = StringUtils.split(sourceField, ".");
                String mapValue = result[0];            
                
                Set<String> targets = map.get(mapValue);
                if (targets != null) {
                    targets.add(targetField);
                } else {
                    LOGGER.error("Accessed property with the name {} which isn't existing", mapValue);
                }
            }
        }
    }
1272393
@Override
    public PointersPair alloc(AllocationStatus targetMode, AllocationPoint point, AllocationShape shape,
                    boolean initialize) {

        long reqMemory = AllocationUtils.getRequiredMemory(shape);
        CudaContext context = getCudaContext();
        switch (targetMode) {
            case HOST: {
                if (MemoryTracker.getInstance().getActiveHostAmount() + reqMemory >= configuration.getMaximumZeroAllocation()) {

                    while (MemoryTracker.getInstance().getActiveHostAmount() + reqMemory >= configuration.getMaximumZeroAllocation()) {

                        val before = MemoryTracker.getInstance().getActiveHostAmount();
                        memoryProvider.purgeCache();
                        Nd4j.getMemoryManager().invokeGc();
                        val after = MemoryTracker.getInstance().getActiveHostAmount();

                        log.debug("[HOST] before: {}; after: {};", before, after);

                        if (MemoryTracker.getInstance().getActiveHostAmount() + reqMemory >= configuration.getMaximumZeroAllocation()) {
                            try {
                                log.warn("No available [HOST] memory, sleeping for a while... Consider increasing -Xmx next time.");
                                log.debug("Currently used: [" + zeroUseCounter.get() + "], allocated objects: [" + zeroAllocations.get(0) + "]");

                                memoryProvider.purgeCache();
                                Nd4j.getMemoryManager().invokeGc();
                                Thread.sleep(1000);
                            } catch (Exception e) {
                                throw new RuntimeException(e);
                            }
                        }
                    }
                }


                PointersPair pair = memoryProvider.malloc(shape, point, targetMode);


                if (initialize) {
                    org.bytedeco.javacpp.Pointer.memset(pair.getHostPointer(), 0, reqMemory);
                    point.tickHostWrite();
                }


                pickupHostAllocation(point);

                return pair;
            }
            case DEVICE: {
                int deviceId = getDeviceId();

                PointersPair returnPair = new PointersPair();
                PointersPair tmpPair = new PointersPair();

                // if the initial memory location is device, there's a chance we don't have zero memory allocated
                if (point.getPointers() == null || point.getPointers().getHostPointer() == null) {
                    tmpPair = alloc(AllocationStatus.HOST, point, point.getShape(), initialize);

                    returnPair.setDevicePointer(tmpPair.getHostPointer());
                    returnPair.setHostPointer(tmpPair.getHostPointer());

                    point.setAllocationStatus(AllocationStatus.HOST);
                    point.setPointers(tmpPair);
                }
/*
                if (reqMemory < configuration.getMaximumSingleHostAllocation()
                                && deviceMemoryTracker.getAllocatedSize(deviceId) + reqMemory < configuration
                                                .getMaximumDeviceAllocation()) {
*/


                    //val timeStart = System.nanoTime();
                    //long free = NativeOpsHolder.getInstance().getDeviceNativeOps().getDeviceFreeMemory();
                    //val timeEnd = System.nanoTime();

                    //log.info("Free time: {} ns; Free memory: {} bytes", (timeEnd - timeStart), free);

                    if (deviceMemoryTracker.reserveAllocationIfPossible(Thread.currentThread().getId(), deviceId, reqMemory)) {
                        point.setDeviceId(deviceId);
                        val pair = memoryProvider.malloc(shape, point, targetMode);
                        if (pair != null) {
                            returnPair.setDevicePointer(pair.getDevicePointer());

                            point.setAllocationStatus(AllocationStatus.DEVICE);

                            if (point.getPointers() == null)
                                throw new RuntimeException("PointersPair can't be null");

                            point.getPointers().setDevicePointer(pair.getDevicePointer());

                            deviceAllocations.get(deviceId).put(point.getObjectId(), point.getObjectId());


                            val p = point.getBucketId();

                            if (p != null) {
                                val m = zeroAllocations.get(point.getBucketId());

                                // m can be null, if that's point from workspace - just no bucketId for it
                                if (m != null)
                                    m.remove(point.getObjectId());
                            }

                            deviceMemoryTracker.addToAllocation(Thread.currentThread().getId(), deviceId, reqMemory);

                            //  point.tickDeviceWrite();
                            point.tickHostWrite();

                            if (!initialize) {
                                point.tickDeviceWrite();
                                point.tickHostRead();
                            } else {
                                nativeOps.memsetAsync(pair.getDevicePointer(), 0, reqMemory, 0,
                                                context.getSpecialStream());
                                context.getSpecialStream().synchronize();

                                point.tickDeviceWrite();
                                point.tickHostRead();

                                //AtomicAllocator.getInstance().getFlowController().registerAction(ctx, point);
                            }
                        } else {
                            log.warn("Out of [DEVICE] memory, host memory will be used instead: deviceId: [{}], requested bytes: [{}]; Approximate free bytes: {}; Real free bytes: {}", deviceId, reqMemory, MemoryTracker.getInstance().getApproximateFreeMemory(deviceId), MemoryTracker.getInstance().getPreciseFreeMemory(deviceId));
                            log.info("Total allocated dev_0: {}", MemoryTracker.getInstance().getActiveMemory(0));
                            log.info("Cached dev_0: {}", MemoryTracker.getInstance().getCachedAmount(0));
                            log.info("Allocated dev_0: {}", MemoryTracker.getInstance().getAllocatedAmount(0));
                            log.info("Workspace dev_0: {}", MemoryTracker.getInstance().getWorkspaceAllocatedAmount(0));
                            //log.info("Total allocated dev_1: {}", MemoryTracker.getInstance().getActiveMemory(1));
                            // if device memory allocation failed (aka returned NULL), keep using host memory instead

                            returnPair.setDevicePointer(tmpPair.getHostPointer());

                            point.setAllocationStatus(AllocationStatus.HOST);

                            Nd4j.getMemoryManager().invokeGc();
                            try {
                                Thread.sleep(100);
                            } catch (Exception e) {

                            }
                        }
                    } else {
                        log.warn("Hard limit on [DEVICE] memory hit, please consider tuning memory parameters, deviceId [{}]",
                                        deviceId);

                        Nd4j.getMemoryManager().invokeGc();
                        try {
                            Thread.sleep(100);
                        } catch (InterruptedException e) {
                            //
                        }
                    }

                return returnPair;
            }
            default:
                throw new IllegalStateException("Can't allocate memory on target [" + targetMode + "]");
        }
    }
1008205
private void repartitionBroadcastState(
			Map<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> broadcastState,
			List<Map<StreamStateHandle, OperatorStateHandle>> mergeMapList) {

		int newParallelism = mergeMapList.size();
		for (int i = 0; i < newParallelism; ++i) {

			final Map<StreamStateHandle, OperatorStateHandle> mergeMap = mergeMapList.get(i);

			// for each name, pick the i-th entry
			for (Map.Entry<String, List<Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo>>> e :
					broadcastState.entrySet()) {

				int previousParallelism = e.getValue().size();

				Tuple2<StreamStateHandle, OperatorStateHandle.StateMetaInfo> handleWithMetaInfo =
					e.getValue().get(i % previousParallelism);

				OperatorStateHandle operatorStateHandle = mergeMap.get(handleWithMetaInfo.f0);
				if (operatorStateHandle == null) {
					operatorStateHandle = new OperatorStreamStateHandle(
						new HashMap<>(broadcastState.size()),
						handleWithMetaInfo.f0);
					mergeMap.put(handleWithMetaInfo.f0, operatorStateHandle);
				}
				operatorStateHandle.getStateNameToPartitionOffsets().put(e.getKey(), handleWithMetaInfo.f1);
			}
		}
	}
547526
function (state, move) {
            var point = this,
              plotX = point.plotX,
              plotY = point.plotY,
              series = point.series,
              stateOptions = series.options.states,
              markerOptions = defaultPlotOptions[series.type].marker && series.options.marker,
              normalDisabled = markerOptions && !markerOptions.enabled,
              markerStateOptions = markerOptions && markerOptions.states[state],
              stateDisabled = markerStateOptions && markerStateOptions.enabled === false,
              stateMarkerGraphic = series.stateMarkerGraphic,
              pointMarker = point.marker || {},
              chart = series.chart,
              radius,
              halo = series.halo,
              haloOptions,
              newSymbol,
              pointAttr;

            state = state || NORMAL_STATE; // empty string
            pointAttr = point.pointAttr[state] || series.pointAttr[state];

            if (
              // already has this state
            (state === point.state && !move) ||
                // selected points don't respond to hover
            (point.selected && state !== SELECT_STATE) ||
                // series' state options is disabled
            (stateOptions[state] && stateOptions[state].enabled === false) ||
                // general point marker's state options is disabled
            (state && (stateDisabled || (normalDisabled && markerStateOptions.enabled === false))) ||
                // individual point marker's state options is disabled
            (state && pointMarker.states && pointMarker.states[state] && pointMarker.states[state].enabled === false) // #1610

            ) {
                return;
            }

            // apply hover styles to the existing point
            if (point.graphic) {
                radius = markerOptions && point.graphic.symbolName && pointAttr.r;
                point.graphic.attr(merge(
                  pointAttr,
                  radius ? { // new symbol attributes (#507, #612)
                      x: plotX - radius,
                      y: plotY - radius,
                      width: 2 * radius,
                      height: 2 * radius
                  } : {}
                ));

                // Zooming in from a range with no markers to a range with markers
                if (stateMarkerGraphic) {
                    stateMarkerGraphic.hide();
                }
            } else {
                // if a graphic is not applied to each point in the normal state, create a shared
                // graphic for the hover state
                if (state && markerStateOptions) {
                    radius = markerStateOptions.radius;
                    newSymbol = pointMarker.symbol || series.symbol;

                    // If the point has another symbol than the previous one, throw away the
                    // state marker graphic and force a new one (#1459)
                    if (stateMarkerGraphic && stateMarkerGraphic.currentSymbol !== newSymbol) {
                        stateMarkerGraphic = stateMarkerGraphic.destroy();
                    }

                    // Add a new state marker graphic
                    if (!stateMarkerGraphic) {
                        if (newSymbol) {
                            series.stateMarkerGraphic = stateMarkerGraphic = chart.renderer.symbol(
                              newSymbol,
                                plotX - radius,
                                plotY - radius,
                                2 * radius,
                                2 * radius
                              )
                              .attr(pointAttr)
                              .add(series.markerGroup);
                            stateMarkerGraphic.currentSymbol = newSymbol;
                        }

                        // Move the existing graphic
                    } else {
                        stateMarkerGraphic[move ? 'animate' : 'attr']({ // #1054
                            x: plotX - radius,
                            y: plotY - radius
                        });
                    }
                }

                if (stateMarkerGraphic) {
                    stateMarkerGraphic[state && chart.isInsidePlot(plotX, plotY, chart.inverted) ? 'show' : 'hide'](); // #2450
                }
            }

            // Show me your halo
            haloOptions = stateOptions[state] && stateOptions[state].halo;
            if (haloOptions && haloOptions.size) {
                if (!halo) {
                    series.halo = halo = chart.renderer.path()
                      .add(series.seriesGroup);
                }
                halo.attr(extend({
                    fill: Color(point.color || series.color).setOpacity(haloOptions.opacity).get()
                }, haloOptions.attributes))[move ? 'animate' : 'attr']({
                    d: point.haloPath(haloOptions.size)
                });
            } else if (halo) {
                halo.attr({ d: [] });
            }

            point.state = state;
        }
989974
def add_arc(self, src, dst, char):
        
        # assert type(src) == type(int()) and type(dst) == type(int()), \
        #     "State type should be integer."
        # assert char in self.I
        #
        #print self.states
        #print src
        for s_idx in [src, dst]:
            if s_idx >= len(self.states):
                for i in range(len(self.states), s_idx + 1):
                    self.states.append(DFAState(i))
        for arc in self.states[src].arcs:
            if arc.ilabel == self.isyms.__getitem__(char) or char == EPSILON:
                self.nfa = True
                break
        self.states[src].arcs.append(
            DFAArc(src, dst, self.isyms.__getitem__(char)))
596395
def target_sdp_state(self, state):
        """"""
        LOG.info('Setting SDP target state to %s', state)
        if self._sdp_state.current_state == state:
            LOG.info('Target state ignored, SDP is already "%s"!', state)
        if state == 'on':
            self.set_state(DevState.ON)
        if state == 'off':
            self.set_state(DevState.OFF)
        if state == 'standby':
            self.set_state(DevState.STANDBY)
        if state == 'disable':
            self.set_state(DevState.DISABLE)
        self._sdp_state.update_target_state(state)
59672
private void setInUseAndPreviousInUse(int p, int s) {
    setSizeAndPreviousInUseOfInUseChunk(p, s);
    head(p + s, head(p + s) | PINUSE_BIT);
  }
817944
public void setTargetAddress(String targetAddress)
    {
        try
        {
            this.JOB.setDialstring(targetAddress);
        }
        catch(Exception exception)
        {
            throw new FaxException("Error while setting job target address.",exception);
        }
    }
73271
def _roots_to_targets(self, build_graph, target_roots):
    """"""
    with self._run_tracker.new_workunit(name='parse', labels=[WorkUnitLabel.SETUP]):
      return [
        build_graph.get_target(address)
        for address
        in build_graph.inject_roots_closure(target_roots, self._fail_fast)
      ]
1251369
private int addState(Label reattachPoint, Statement restore) {
    ReattachState create = ReattachState.create(reattachPoint, restore);
    reattaches.add(create);
    int state = reattaches.size() - 1; // the index of the ReattachState in the list
    return state;
  }
18942
def updateTargetState(self, newState):
        
        self._targetStateProvider.state = loadTargetState(newState, self._targetStateProvider.state)
        for device in self.deviceController.getDevices():
            self.updateDeviceState(device.payload)
356136
function( address, bank, size ) {
		var offset = bank * size,
			bankData = this.chrData.subarray( offset, offset + size );

		this.chrRead.set( bankData, address );
	}
1331478
def routingAreaUpdateComplete(ReceiveNpduNumbersList_presence=0):
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0xa)  # 00001010
    packet = a / b
    if ReceiveNpduNumbersList_presence is 1:
        c = ReceiveNpduNumbersList(ieiRNNL=0x26)
        packet = packet / c
    return packet