예제 #1
0
        public static Block64[][] Partition(long rowStartIndex, long columnStartIndex, long rowCount, long columnCount,
                                            long numRowBlocks, long numColumnBlocks)
        {
            Range64[] rowRanges = RangePartitioner64.Partition(rowStartIndex, rowCount, numRowBlocks);
            Range64[] colRanges = RangePartitioner64.Partition(columnStartIndex, columnCount, numColumnBlocks);
            var       result    = new Block64[numRowBlocks][];

            for (int i = 0; i < rowRanges.Length; i++)
            {
                result[i] = new Block64[numColumnBlocks];

                for (int j = 0; j < colRanges.Length; j++)
                {
                    result[i][j] = new Block64(rowRanges[i], colRanges[j]);
                }
            }

            return(result);
        }
예제 #2
0
        public static Block64[][] PartitionByLength(long rowStartIndex, long columnStartIndex, long rowCount,
                                                    long columnCount, long maxRowPartitionLength,
                                                    long maxColumnPartitionLength)
        {
            Range64[] rowRanges = RangePartitioner64.PartitionByLength(rowStartIndex, rowCount, maxRowPartitionLength);
            Range64[] colRanges = RangePartitioner64.PartitionByLength(columnStartIndex, columnCount,
                                                                       maxColumnPartitionLength);
            var result = new Block64[rowRanges.Length][];

            for (int i = 0; i < rowRanges.Length; i++)
            {
                result[i] = new Block64[colRanges.Length];

                for (int j = 0; j < colRanges.Length; j++)
                {
                    result[i][j] = new Block64(rowRanges[i], colRanges[j]);
                }
            }

            return(result);
        }