摘要:
A method and apparatus are disclosed for prefragmenting or presegmenting data. A data protocol type and length are provided. Based on the type and length, a linked list memory buffer structure is determined. Locations within the memory buffer structure for storage of data therein is also determined allowing for sufficient unused memory therein to support one of a fragmentation operation and a segmentation operation subsequent to memory allocation. As such, further memory allocation during a fragmentation operation or a segmentation operation is obviated. The determined memory buffer structure is then allocated.
摘要:
A method of multiplying large integers is disclosed. Two large numbers, x and y, are provided. values are determined in accordance with the Karatsuba multiplication process based on x and y. A first and second value according to the Karatsuba multiplication method are also determined. The third value for use in accordance with the Karatsuba multiplication method is determined by determining C′=(x1+x2)[m−1:0]*(y1+y2)[m−1:0] and determining C=C′+((y1+y2)[2m:2m] AND (x1+x2)[m−1:0]+(x1+x2)[2m:2m] AND (y1+y2)[m:0])
摘要翻译:公开了一种乘以大整数的方法。 提供了两个大数字x和y。 值根据基于x和y的Karatsuba乘法过程确定。 还确定了根据Karatsuba倍增法的第一和第二值。 根据Karatsuba倍增法使用的第三值通过确定C'=(x 1 + x 2 x 2)[m-1:0] *(y &lt; 1&gt; +&lt; 2&lt; 2&gt;)[m-1:0]并确定C = C'+((y 1 + y 2) [2m:2m] AND(x 1 + x 2)[m-1:0] +(x 1 < + x 2)[2m:2m] AND(y 1 + y 2)[m:0])<< m,其中< <是一个按位移位操作,其中AND是通过在第一个操作数内的一个比特的布尔AND和第二个操作数中的每个比特执行,其中D [j:k]是指D的第j个到第k个比特。