Integer Division via Floating-Point Reciprocal Pipelining

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional computer systems lack efficient hardware resources for performing integer division operations, relying on software implementations that are not optimized for performance on conventional processors like CPUs and GPUs, especially when the bit-width of the floating-point mantissa is insufficient for the integer bit-width.

Innovation Solution

A method for performing integer division using a set of steps involving partial quotients and remainders, leveraging single-precision floating-point hardware by computing and adjusting partial quotients and remainders through floating-point reciprocal operations, enabling efficient execution on conventional processors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If software-based integer division is implemented using classical shift-and-subtract algorithm, then it can be executed on conventional processors without dedicated hardware, but the execution performance is poor as it computes no more than one result bit per step

Engineering Contradiction:
Improvecompatibility with conventional processorsVSAvoidinteger division execution performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent replaces the mechanical iterative shift-and-subtract algorithm with a mathematical approach using floating-point reciprocal operations. By computing the reciprocal of the divisor and multiplying it with the dividend, the method achieves parallel computation of multiple quotient bits simultaneously, dramatically improving performance while maintaining compatibility with conventional CPU and GPU hardware that supports floating-point operations.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent changes the computational parameters by using floating-point reciprocal operations instead of integer arithmetic. This allows leveraging the higher performance of floating-point units in conventional processors, transforming the division operation into a sequence of multiplication and adjustment steps that execute faster on standard hardware.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If floating-point reciprocal operation is used to implement integer division, then execution performance improves, but it requires floating-point mantissa bit-width to be larger than integer bit-width, which is not satisfied by standard single-precision floating-point (24-bit mantissa vs 32-bit integer)

Engineering Contradiction:
Improveinteger division execution performanceVSAvoidfloating-point mantissa precision
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent segments the 32-bit integer division into multiple stages, each handling a portion of the computation. By dividing the problem into manageable parts and processing them sequentially with adjustments, the method achieves accurate 32-bit integer division results using only 24-bit floating-point mantissa precision, overcoming the precision limitation of standard single-precision floating-point hardware.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses partial quotient computation where each floating-point reciprocal operation computes an approximate quotient that is then refined through adjustment steps. This partial action approach allows achieving full precision results through multiple less-precise intermediate computations, effectively working around the 24-bit mantissa limitation.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If specialty arithmetic operations like floating-point fused-multiply-add (FMA) are used, then integer division performance improves, but these operations are not supported by dedicated hardware resources on conventional CPUs and GPUs

Engineering Contradiction:
Improveinteger division execution performanceVSAvoidhardware compatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent designs a method that uses universal floating-point multiplication and addition operations that are supported by all conventional CPUs and GPUs. By avoiding specialty operations like FMA and using only standard floating-point instructions, the method achieves high performance integer division on diverse hardware platforms, demonstrating universal compatibility across conventional processors.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8140608B1Pipelined integer division using floating-point reciprocal
Publication Date: 2012.03.20 NVIDIA CORP
  • US8140608B1 patent drawing
  • US8140608B1 patent drawing
  • US8140608B1 patent drawing

AI summary

One embodiment of the present invention sets forth a technique for performing fast integer division using commonly available arithmetic operations. The technique may be implemented in a two-stage process using a single-precision floating point reciprocal in conjunction with integer addition and multiplication. Furthermore, the technique may be fully pipelined on many conventional processors for performance that is comparable to the best available high-performance alternatives.