internal void PropagateSuccessors() { foreach (var successor in Terminator.Targets) { successors.Add(successor); successor.predecessors.Add(this); } }
/// <summary> /// Enables peer access to the given accelerator. /// </summary> /// <param name="otherAccelerator">The other accelerator.</param> public bool EnablePeerAccess(Accelerator otherAccelerator) { lock (syncRoot) { if (HasPeerAccess(otherAccelerator)) { return(true); } if (!CanAccessPeerInternal(otherAccelerator)) { return(false); } Bind(); otherAccelerator.Disposed += PeerAccessAcceleratorDestroyed; storedPeerAccelerators.Add(otherAccelerator.InstanceId); EnablePeerAccessInternal(otherAccelerator); return(true); } }
/// <summary> /// Registers the given value to be moved later. /// </summary> /// <param name="value">The value to be moved.</param> public void Add(Value value) { visited.Add(value); toMove.Add(value); }
/// <summary> /// Adds the given child node. /// </summary> /// <param name="child">The child node to add.</param> private void AddChild(Node child) { Debug.Assert(child.Parent == this, "Invalid child"); children.Add(child); }