System and method of dynamic precision operations
First Claim
1. A computer implemented method of performing computer operations using a first fractional precision and a second fractional precision, comprising:
- accessing with the computer a source variable, a destination variable, and an operation, wherein the source variable has a first dynamic fractional precision, wherein the destination variable has a second dynamic fractional precision that differs from the first dynamic fractional precision, and wherein the operation is related to the source variable and the destination variable;
determining a difference between the first dynamic fractional precision and the second dynamic fractional precision;
converting the source variable to be of the second dynamic fractional precision of the destination variable, according to the difference between the first dynamic fractional precision and the second dynamic fractional precision;
performing the operation using the destination variable and the source variable; and
assigning a value to the destination variable according to the operation.
1 Assignment
0 Petitions
Accused Products
Abstract
In an embodiment, a method performs computer operations using a first fractional precision and a second fractional precision. A computer program has a source variable, a destination variable, and an operation. The source variable has a first dynamic fractional precision, the destination variable has a second dynamic fractional precision that differs from the first dynamic fractional precision, and the operation is related to the source variable and the destination variable. The source variable is aligned to a format of the destination variable, according to the first dynamic fractional precision and the second dynamic fractional precision. The operation is performed using the destination variable and the source variable. A value is assigned to the destination variable according to the operation. In this manner, a single codebase may be written that operates on various hardware that each have different bit precision capabilities, without requiring additional development and verification effort.
20 Citations
20 Claims
-
1. A computer implemented method of performing computer operations using a first fractional precision and a second fractional precision, comprising:
-
accessing with the computer a source variable, a destination variable, and an operation, wherein the source variable has a first dynamic fractional precision, wherein the destination variable has a second dynamic fractional precision that differs from the first dynamic fractional precision, and wherein the operation is related to the source variable and the destination variable; determining a difference between the first dynamic fractional precision and the second dynamic fractional precision; converting the source variable to be of the second dynamic fractional precision of the destination variable, according to the difference between the first dynamic fractional precision and the second dynamic fractional precision; performing the operation using the destination variable and the source variable; and assigning a value to the destination variable according to the operation. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. An apparatus for performing computer operations using a first fractional precision and a second fractional precision, comprising:
-
a memory device that is configured to store a computer program having a source variable, a destination variable, and an operation, wherein the source variable has a first dynamic fractional precision, wherein the destination variable has a second dynamic fractional precision that differs from the first dynamic fractional precision, and wherein the operation is related to the source variable and the destination variable; and a processor that is configured to determine a difference between the first dynamic fractional precision and the second dynamic fractional precision, convert the source variable to be of the second dynamic fractional precision of the destination variable, according to the difference between the first dynamic fractional precision and the second dynamic fractional precision, that is configured to perform the operation using the destination variable and the source variable, and that is configured to assign a value to the destination variable according to the operation.
-
-
20. A non-transitory computer readable medium, comprising software instructions that when executed by one or more processors cause the one or more processors to:
-
read a source variable, a destination variable, and an operation, wherein the source variable has a first dynamic fractional precision, wherein the destination variable has a second dynamic fractional precision that differs from the first dynamic fractional precision, and wherein the operation is related to the source variable and the destination variable; determine a difference between the first dynamic fractional precision and the second dynamic fractional precision; convert the source variable to be of the second dynamic fractional precision of the destination variable, according to the difference between the first dynamic fractional precision and the second dynamic fractional precision; perform the operation using the destination variable and the source variable; and assign a value to the destination variable according to the operation.
-
Specification