public Vector4 FS(VertexOutput input)
        {
            Vector4 ret = new Vector4(
                StructuredInput[0].M11,
                StructuredInput[2].M12,
                StructuredInput[2].M13,
                StructuredInput[3].M14);

            return(ret);
        }
 public Postbox(int channelID, VertexOutput <S, T> sender, StageInput <S, T> receiverBundle, Mailbox <S, T>[] mailboxes, Action <S[], int[], int> routingHashcodeFunction, NetworkChannel networkChannel)
 {
     this.threadindex              = sender.Vertex.Scheduler.Index;
     this.channelID                = channelID;
     this.sender                   = sender;
     this.vertexid                 = sender.Vertex.VertexId;
     this.receiverBundle           = receiverBundle;
     this.routingHashcodesFunction = routingHashcodeFunction;
     this.networkChannel           = networkChannel;
     this.mailboxes                = mailboxes;
     this.returnAddress            = new ReturnAddress(this.ProcessID, this.vertexid, this.threadindex);
 }
Exemplo n.º 3
0
        public Postbox(int channelID, VertexOutput <S, T> sender, StageInput <S, T> receiverBundle, Mailbox <S, T>[] mailboxes, Func <S, int> routingHashcodeFunction, NetworkChannel networkChannel)
        {
            this.threadindex             = sender.Vertex.Scheduler.Index;
            this.channelID               = channelID;
            this.sender                  = sender;
            this.shardid                 = sender.Vertex.VertexId;
            this.receiverBundle          = receiverBundle;
            this.routingHashcodeFunction = routingHashcodeFunction;
            this.networkChannel          = networkChannel;
            this.mailboxes               = mailboxes;

            //this.sendSequenceNumbers = new int[Naiad.Processes, this.receiverBundle.LocalParallelism];
        }
        public BufferingPostbox(int channelID, VertexOutput <S, T> sender, StageInput <S, T> receiverBundle, Mailbox <S, T>[] mailboxes, Action <S[], int[], int> routingHashcodeFunction, NetworkChannel networkChannel, Runtime.Progress.ProgressUpdateBuffer <T> progressBuffer)
            : base(channelID, sender, receiverBundle, mailboxes, routingHashcodeFunction, networkChannel, progressBuffer)
        {
            if (((this.mailboxes.Length - 1) & this.mailboxes.Length) == 0)
            {
                this.mask = this.mailboxes.Length - 1;
            }
            else
            {
                this.mask = -1;
            }

            this.Buffers = new Message <S, T> [this.mailboxes.Length];
        }
Exemplo n.º 5
0
            public Fiber(int channelID, int vertexID, VertexOutput <Update, Empty> sender, ProgressChannel.Mailbox localMailbox, InternalController controller)
            {
                this.processId      = controller.Configuration.ProcessID;
                this.channelID      = channelID;
                this.vertexID       = vertexID;
                this.sender         = sender;
                this.localMailbox   = localMailbox;
                this.networkChannel = controller.NetworkChannel;
                this.numProcesses   = controller.Configuration.Processes;
                int processID = controller.Configuration.ProcessID;

                if (this.networkChannel != null)
                {
                    this.encoder = new AutoSerializedMessageEncoder <Update, Empty>(-1, this.sender.Vertex.Stage.InternalComputation.Index << 16 | this.channelID, this.networkChannel.GetBufferPool(-1, -1), this.networkChannel.SendPageSize, controller.SerializationFormat, SerializedMessageType.Data, () => this.GetNextSequenceNumber());
                    this.encoder.CompletedMessage += (o, a) => { this.BroadcastPageContents(a.Hdr, a.Segment); /* Console.WriteLine("Sending progress message"); */ };
                }
            }
Exemplo n.º 6
0
            public Fiber(int channelID, int vertexID, VertexOutput <Update, Empty> sender, CentralizedProgressChannel.Mailbox localMailbox, InternalController controller, int receiverVertexId, int receiverProcessId)
            {
                this.channelID      = channelID;
                this.vertexID       = vertexID;
                this.sender         = sender;
                this.localMailbox   = localMailbox;
                this.networkChannel = controller.NetworkChannel;
                this.numProcesses   = controller.Configuration.Processes;
                int processID = controller.Configuration.ProcessID;

                this.receiverVertexId  = receiverVertexId;
                this.receiverProcessId = receiverProcessId;

                if (this.networkChannel != null)
                {
                    this.encoder = new AutoSerializedMessageEncoder <Update, Empty>(0, this.sender.Vertex.Stage.InternalComputation.Index << 16 | this.channelID, this.networkChannel.GetBufferPool(0, -1), this.networkChannel.SendPageSize, controller.SerializationFormat, SerializedMessageType.Data, () => this.networkChannel.GetSequenceNumber(-1));
                    this.encoder.CompletedMessage += (o, a) => { this.SendPageContents(a.Hdr, a.Segment); };
                }
            }
Exemplo n.º 7
0
            public Fiber(int channelID, int shardID, VertexOutput <Int64, Pointstamp> sender, CentralizedProgressChannel.Mailbox localMailbox, InternalController controller, int receiverShardId, int receiverProcessId)
            {
                this.channelID      = channelID;
                this.shardID        = shardID;
                this.sender         = sender;
                this.localMailbox   = localMailbox;
                this.networkChannel = controller.NetworkChannel;
                this.numProcesses   = controller.Configuration.Processes;
                int processID = controller.Configuration.ProcessID;

                this.receiverShardId   = receiverShardId;
                this.receiverProcessId = receiverProcessId;

                if (this.networkChannel != null)
                {
                    this.encoder = new AutoSerializedMessageEncoder <Int64, Pointstamp>(0,
                                                                                        this.sender.Vertex.Stage.InternalGraphManager.Index << 16 | this.channelID, this.networkChannel.GetBufferPool(0, -1), this.networkChannel.SendPageSize, AutoSerializationMode.Basic, SerializedMessageType.Data,
                                                                                        () => this.networkChannel.GetSequenceNumber(-1));
                    this.encoder.CompletedMessage += (o, a) => { this.SendPageContents(a.Hdr, a.Segment); };
                }
            }
Exemplo n.º 8
0
 internal void Register(VertexOutput <R, T> endpoint)
 {
     this.endpointMap[endpoint.Vertex.VertexId] = endpoint;
 }
Exemplo n.º 9
0
 public Postbox(int channelID, VertexOutput <S, T> sender, StageInput <S, T> receiverBundle, Mailbox <S, T>[] mailboxes, Func <S, int> routingHashcodeFunction, NetworkChannel networkChannel, Runtime.Progress.ProgressUpdateBuffer <T> progressBuffer)
     : this(channelID, sender, receiverBundle, mailboxes, routingHashcodeFunction, networkChannel)
 {
     this.progressBuffer = progressBuffer;
 }
Exemplo n.º 10
0
 public Vector4 FS(VertexOutput input)
 {
     return(input.Color);
 }
 public NoHashCodePostbox(int channelID, VertexOutput <S, T> sender, StageInput <S, T> receiverBundle, Mailbox <S, T>[] mailboxes, NetworkChannel networkChannel, Runtime.Progress.ProgressUpdateBuffer <T> progressBuffer)
     : base(channelID, sender, receiverBundle, mailboxes, null, networkChannel, progressBuffer)
 {
     this.destination = this.vertexid % this.mailboxes.Length;
 }