Exemple #1
0
        static void print(SSSPCell cell)
        {
            Console.WriteLine("Id: " + cell.CellID);
            Console.WriteLine("Sum: " + cell.sum);

            //Console.WriteLine("outNeighbors: " + printList(cell.outNeighbors));
            //Console.WriteLine("Active Neighbor Count: " + cell.activeNeighborCount);
            //Console.WriteLine("Received Neighbor Count: " + cell.receivedNeighborCount);


            Console.WriteLine("inNeighbors: " + printList(cell.inNeighbors));
            Console.WriteLine("inNeighborsActiveStatus: " + printList(cell.inNeighborsActiveStatus));
            Console.WriteLine("inNeighborsReceivedStatus: " + printList(cell.inNeighborsReceivedStatus));
            Console.WriteLine("inNeighborsValue: " + printList(cell.inNeighborsValue));
        }
Exemple #2
0
        private void initialSend(SSSPCell rootCell)
        {
            //Console.WriteLine(value);
            addCount();

            double v = 1 / rootCell.outNeighbors.Count;

            MessageSorter sorter = new MessageSorter(rootCell.outNeighbors);

            for (int i = 0; i < Global.SlaveCount; i++)
            {
                RankUpdatingMessageWriter msg =
                    new RankUpdatingMessageWriter(rootCell.CellID, v, sorter.GetCellRecipientList(i));
                Global.CloudStorage.RankUpdatingToSlave(i, msg);
            }
        }
Exemple #3
0
        private void initialPropagate(SSSPCell cell, bool isActive)
        {
            //clear
            for (int i = 0; i < cell.inNeighborsReceivedStatus.Count; i++)
            {
                cell.inNeighborsReceivedStatus[i] = false;
            }
            //cell.receivedNeighborCount = 0;

            //send-out
            double v = 1.0 / cell.outNeighbors.Count;

            MessageSorter sorter = new MessageSorter(cell.outNeighbors);

            for (int i = 0; i < Global.SlaveCount; i++)
            {
                //Console.WriteLine(sorter.GetCellRecipientList(i).Count);
                RankUpdatingMessageWriter msg = new RankUpdatingMessageWriter(cell.CellID, isActive, v, sorter.GetCellRecipientList(i));
                Global.CloudStorage.RankUpdatingToSlave(i, msg);
            }
        }
Exemple #4
0
        private void propagate(SSSPCell cell, bool isActive)
        {
            //clear
            for (int i = 0; i < cell.inNeighborsReceivedStatus.Count; i++)
            {
                cell.inNeighborsReceivedStatus[i] = false;
            }
            //cell.receivedNeighborCount = 0;

            //send-out
            double v = cell.sum / cell.outNeighbors.Count;

            MessageSorter sorter = new MessageSorter(cell.outNeighbors);
            for (int i = 0; i < Global.SlaveCount; i++)
            {
                //Console.WriteLine(sorter.GetCellRecipientList(i).Count);
                RankUpdatingMessageWriter msg = new RankUpdatingMessageWriter(cell.CellID, isActive, v, sorter.GetCellRecipientList(i));
                Global.CloudStorage.RankUpdatingToSlave(i, msg);
            }
        }
Exemple #5
0
        static void print(SSSPCell cell)
        {
            Console.WriteLine("Id: " + cell.CellID);
            Console.WriteLine("Sum: " + cell.sum);

            //Console.WriteLine("outNeighbors: " + printList(cell.outNeighbors));
            //Console.WriteLine("Active Neighbor Count: " + cell.activeNeighborCount);
            //Console.WriteLine("Received Neighbor Count: " + cell.receivedNeighborCount);

            Console.WriteLine("inNeighbors: " + printList(cell.inNeighbors));
            Console.WriteLine("inNeighborsActiveStatus: " + printList(cell.inNeighborsActiveStatus));
            Console.WriteLine("inNeighborsReceivedStatus: " + printList(cell.inNeighborsReceivedStatus));
            Console.WriteLine("inNeighborsValue: " + printList(cell.inNeighborsValue));
        }
Exemple #6
0
        private void send(SSSPCell rootCell)
        {
            //Console.WriteLine(value);
            addCount();

            double v = rootCell.sum / rootCell.outNeighbors.Count;

            MessageSorter sorter = new MessageSorter(rootCell.outNeighbors);
            for (int i = 0; i < Global.SlaveCount; i++)
            {
                RankUpdatingMessageWriter msg =
                    new RankUpdatingMessageWriter(rootCell.CellID, v, sorter.GetCellRecipientList(i));
                Global.CloudStorage.RankUpdatingToSlave(i, msg);
            }
        }