Computer implementation methods, computer programs, computer systems, and computer implementation methods (dynamic algorithm selection)

JP7960447B2Active Publication Date: 2026-12-03INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023025961
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-02-25
Filing Date
2023-02-22
Publication Date
2026-12-03
Estimated Expiration
2043-02-22

Smart Images

  • Figure 0007960447000001
    Figure 0007960447000001
  • Figure 0007960447000002
    Figure 0007960447000002
  • Figure 0007960447000003
    Figure 0007960447000003
Patent Text Reader

Abstract

To solve the problem in which each algorithm has advantages and disadvantages, depending upon operands.SOLUTION: Dynamic selection of a multiplication algorithm by receiving operands A and B, determining a difference between A and B, selecting a first multiplication algorithm if the difference falls below a threshold, selecting a second multiplication algorithm if the difference equals or exceeds the threshold, pre-scaling the operands, calculating a quotient for the scaled operands, back-multiplying the quotient and the operand B using the selected algorithm, yielding a product, subtracting the product from operand A, yielding a remainder, and providing the remainder as an output.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure generally relates to dynamic selection of processor algorithms. The present disclosure specifically relates to dynamic selection of processor multiplication algorithms depending on input data. [Background Art]

[0002] Common Business Oriented Language (COBOL) is a computer programming language used worldwide with a vast established base of legacy programs. Many Customer Information Control System (CICS®) transactions are supported through COBOL code. Millions of CICS transactions are processed each second of the day. COBOL supports a wide range of arithmetic functions for decimal arithmetic, including a vector remainder decimal function VRP that receives inputs (A, B) and calculates a quotient and remainder such that A=quotient*B+remainder, the absolute value of the remainder<the absolute value of B, and the sign of the remainder is the sign of A. The VRP function outputs the remainder. (Note: The term "CICS" may be subject to trademark rights in various jurisdictions throughout the world and is used herein only to refer to products or services properly denoted by the mark to the extent such trademark rights may exist.)

[0003] The calculation of the remainder is split into a division portion where the quotient is calculated, and a remainder portion where the quotient is multiplied by the divisor and the result is subtracted from the dividend. Depending on the value of the quotient, the algorithm utilized to multiply the quotient by the divisor may require more or fewer computing cycles to complete. Since millions of operations occur per second, selecting a more efficient multiplication algorithm for each such operation results in the benefit that millions fewer computing cycles are utilized to complete processing of the VRP function. [Summary of Invention] [Problem to be Solved by the Invention]

[0004] Each algorithm has its advantages and disadvantages, depending on the operands. [Means for solving the problem]

[0005] The following is an overview to provide a basic understanding of one or more embodiments of this disclosure. This overview is not intended to identify any major or important elements, or to define any scope of any particular embodiment or any scope of any claim. Its sole purpose is to present a simplified form of the concepts as a prelude to the more detailed description to be presented later. In one or more embodiments described herein, a device, system, computer implementation method, apparatus, or computer program product, or a combination thereof, enables the dynamic selection of a multiplication algorithm in response to an input value.

[0006] Aspects of the present invention disclose a method, system, and computer-readable medium associated with the dynamic selection of a multiplication algorithm by receiving operands A and B, determining the difference between A and B, selecting a first multiplication algorithm if the difference is below a threshold, selecting a second multiplication algorithm if the difference is greater than or equal to a threshold, pre-scaling the operands, calculating a quotient for the scaled operands, back-multiplying the quotient and operand B using the selected algorithm to obtain a product, subtracting the product from operand A to obtain a remainder, and providing the remainder as an output. [Brief explanation of the drawing]

[0007] The above and other purposes, features, and advantages of this disclosure will become more apparent through a more detailed description of some embodiments of this disclosure in the accompanying drawings, where the same reference numerals generally refer to the same components of embodiments of this disclosure.

[0008] [Figure 1] A schematic diagram of the computing environment relating to one embodiment of the present invention is provided.

[0009] [Figure 2] A flowchart illustrating the operation sequence related to one embodiment of the present invention is provided.

[0010] [Figure 3] This shows the cloud computing environment related to one embodiment of the present invention.

[0011] [Figure 4] An abstraction model layer relating to one embodiment of the present invention is shown. [Modes for carrying out the invention]

[0012] Several embodiments are described in more detail with reference to the accompanying drawings, which illustrate embodiments of the present disclosure. However, the present disclosure can be implemented in various ways and should not be construed as being limited to the embodiments disclosed herein.

[0013] The calculation of the remainder output for a function such as VRP(A,B) includes a division calculation in which the quotient of A divided by B is determined, and a remainder part in which the quotient * B is subtracted from A, leaving the remainder as the final output. The choice of algorithm used for the quotient calculation and the algorithm used for the back multiplication part is based on data type, area requirements, cycle time requirements, performance, etc. For decimal division, operand prescaling followed by a digit-by-digit loop spanning four cycles yields the quotient. For multiplication, the system may have the option of either digit-by-digit multiplication and sequential addition of partial products, or multi-digit multiplication combined with a decimal reduction tree. Each algorithm has advantages and disadvantages depending on the operands. If at least one operand is short, digit-by-digit multiplication requires fewer computing cycles to complete. For longer operands, multi-digit multiplication takes fewer computing cycles.

[0014] In one embodiment, the method determines the relative size of the operands and selects an algorithm according to the relative operand size. In one embodiment, the method selects digit-by-digit multiplication for operands whose number of digits in the quotient is estimated based on a leading zero difference of less than 4, and selects multi-digit multiplication for those operands whose number of digits in the quotient is estimated based on a leading zero difference of 4 or more. In this embodiment, the method determines the number of digits in the quotient according to the leading zeros of the input by the formula:#Quotient digits=(leading zeros B - leading zeros A, leading zeros B - leading zeros A + 1).

[0015] Aspects of the present invention generally relate to improving processing efficiency through the dynamic selection of a multiplication algorithm in response to an input value. In an embodiment, a computing system receives a calculation (division) request, scales the operands for efficiency, determines the quotient and simultaneously estimates the number of digits in the quotient, selects a back multiplication algorithm in response to the estimated number of digits in the quotient, back multiplies the quotient using the selected algorithm, and subtracts the product of the back multiplications from the dividend to determine the remainder as the final output. The selection of an algorithm in response to a defined threshold for the estimated number of digits in the quotient allows the computing system to process division operations more efficiently and saves computing cycles.

[0016] According to aspects of the present invention, there exists a method for dynamically selecting an appropriate back multiplication algorithm for division calculations. The method estimates the number of digits in the quotient and selects an algorithm based on the relationship between the estimated number of digits in the quotient and a defined threshold of 4. A first algorithm, sequential addition of digit-wise multiplication and partial products, is selected for quotient digit estimates of less than 4, while multi-digit multiplication combined with a decimal reduction tree is selected for quotient digit estimates of 4 or more. The more the number of digits in the quotient deviates from 4, the greater the number of computing cycles saved through the dynamic algorithm selection method.

[0017] Aspects of the present invention provide improvements in the field of central processor computing instruction execution. For a quotient having three digits, the method saves approximately three computing cycles by selecting digit-by-digit multiplication, and for a quotient having five digits, the method saves one cycle by selecting multi-digit multiplication. Greater cycle savings are achieved for quotients with more digits. The reduced cycles save processing time and energy required to complete the processing, resulting in more efficient overall computing operation.

[0018] Aspects of the present invention also provide improvements to computer functions. In particular, implementations of the present invention relate to specific improvements in how a processor calculates division calculations. The disclosed method reduces the number of cycles required for such calculations, resulting in time and energy savings for operators of such systems.

[0019] In one embodiment, one or more components of the system can use hardware, software, or a combination thereof to solve problems that are inherently highly technical (e.g., receiving an operand, scaling the operand, calculating the quotient of the operand, estimating the number of digits in the quotient, selecting a back-multiplication algorithm corresponding to the digit estimation of the quotient, back-multiplying the quotient using the selected algorithm, and determining the remainder output by subtracting the product of back-multiplications from the dividend). These solutions are not abstract and cannot be performed as a set of human mental activities, for example, due to the processing power required to facilitate dynamic algorithm selection. Furthermore, some of the processes to be performed may be performed by a dedicated computer to perform defined tasks related to mathematical computation. For example, a dedicated computer may be used to perform tasks related to mathematical computation, including dynamic algorithm selection.

[0020] In one embodiment, the disclosed method relates to the processing of instructions by a computing system comprising one or more processors. As part of the computing system's normalization, two operands (A, B) are passed to the processor for a division / remainder calculation, such as a VRP, which provides the remainder of the operation A / B as its output. First, the processor normalizes the two input operands, performs padding of the operands with trailing zeros to satisfy the format, and performs a scaling operation on the divisor B. Pre-scaling of the operands for the division calculation takes approximately 18 cycles to complete. Following scaling, the method determines the quotient A / B, taking a different number of cycles depending on the number of digits in the quotient. In this embodiment, while the method performs the division operation, the method estimates the number of digits in the quotient. In one embodiment, before normalizing the inputs, the method estimates the number of digits in the quotient as the difference between the number of leading zeros in input B and the number of leading zeros in input A, plus 1. The estimation of the number of digits in the quotient occurs during the same cycle used to calculate the actual quotient A / B, and therefore does not add latency to the overall calculation through the addition of the estimation and subsequent algorithm selection.

[0021] In one embodiment, the number of digits in the quotient is related to the number of cycles required for different multiplication algorithms to calculate the product of the quotient and B in order to determine the remainder when the product is subtracted from A. For two algorithms, digit-by-digit multiplication and sequential addition of partial products, and multi-digit multiplication and decimal reduction tree, the number of cycles required for back multiplication is approximately equal for a 4-digit quotient, while for fewer than 4 digits, digit-by-digit multiplication is preferred, and for more than 4 digits, the multi-digit multiplication algorithm is preferred.

[0022] Following the calculation of the quotient and the estimation of the number of digits in the quotient, and the selection of a multiplication algorithm, the method applies the selected multiplication algorithm to operand B and the quotient to obtain the product quotient * B. This operation requires different computing cycles depending on the number of digits in the quotient and the multiplication algorithm selected for use.

[0023] Following determination of the product, the method subtracts the product from the operand to determine a remainder that is provided as an output of the function. The calculation of the remainder takes the same number of cycles regardless of the multiplication algorithm selected.

[0024] On a system-wide basis, efficiency gains are achieved by the system selecting a more efficient multiplication algorithm for each iteration of a remainder function by the system. With each such selection, the system saves computing cycles.

[0025] FIG. 1 provides a schematic diagram of an example network resource associated with implementing the disclosed invention. The invention may be implemented in any processor of the disclosed elements for processing instruction streams. As shown in the figure, a network client device 110 connects wirelessly to the server subsystem 102. A client device 104 connects wirelessly to the server subsystem 102 via a network 114. The client devices 104 and 110 include a time series dataset selection program (not shown), along with sufficient computing resources (processor, memory, network communication hardware) to execute the algorithm selection program. As shown in FIG. 1, the server subsystem 102 includes a server computer 150. FIG. 1 is a block diagram of components of the server computer 150 within the network computer system 1000, in accordance with one embodiment of the invention. It should be understood that FIG. 1 provides an illustration of one implementation only and is not meant to imply any limitation regarding the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made.

[0026] The server computer 150 may include a processor 154, memory 158, persistent storage 170, a communication unit 152, an input / output (I / O) interface 156, and a communication fabric 140. The communication fabric 140 provides communication between the cache 162, memory 158, persistent storage 170, communication unit 152, and the input / output (I / O) interface 156. The communication fabric 140 can be implemented in any architecture designed to pass data or control information, or a combination thereof, between processors (such as microprocessors, communication and network processors), system memory, peripheral devices, and any other hardware components in the system. For example, the communication fabric 140 may be implemented on one or more buses.

[0027] Memory 158 and persistent storage 170 are computer-readable storage media. In this embodiment, memory 158 includes random access memory (RAM) 160. Generally, memory 158 may include any suitable volatile or non-volatile computer-readable storage media. Cache 162 is a high-speed memory that improves the performance of processor 154 by holding recently accessed data and data near recently accessed data from memory 158.

[0028] Program instructions and data used to implement embodiments of the present invention, such as a multiplication algorithm selection program 175, are stored in persistent storage 170 for execution or access, or a combination thereof, by one or more of the processors 154 of the server computer 150 via cache 162. In this embodiment, persistent storage 170 includes a magnetic hard disk drive. In lieu of or in addition to a magnetic hard disk drive, persistent storage 170 may include a solid-state hard drive, a semiconductor storage device, read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, or any other computer-readable storage medium capable of storing program instructions or digital information.

[0029] The media used by the persistent storage 170 may also be removable. For example, a removable hard drive may be used for the persistent storage 170. Other examples include optical and magnetic disks, thumb drives, and smart cards inserted into the drive for transfer to another computer-readable storage medium, which is also part of the persistent storage 170.

[0030] In these examples, the communication unit 152 provides communication with other data processing systems or devices, including the resources of client computing devices 104 and 110. In these examples, the communication unit 152 includes one or more network interface cards. The communication unit 152 may provide communication through the use of either or both physical communication links and wireless communication links. Software distributed programs, and other programs and data used for the implementation of the present invention, may be downloaded through the communication unit 152 to the persistent storage 170 of the server computer 150.

[0031] The I / O interface 156 enables data input and output with other devices that may be connected to the server computer 150. For example, the I / O interface 156 may provide connection to an external device 190 such as a keyboard, keypad, touchscreen, microphone, digital camera, or several other suitable input devices, or a combination thereof. The external device 190 may also include portable computer-readable storage media such as a thumb drive, portable optical or magnetic disk, and memory card. In embodiments of the present invention, for example, the software and data used to implement the multiplication algorithm selection program 175 on the server computer 150 may be stored on such portable computer-readable storage media and loaded onto persistent storage 170 via the I / O interface 156. The I / O interface 156 also connects to a display 180.

[0032] The display 180 provides a mechanism for displaying data to the user and may be, for example, a computer monitor. The display 180 may also function as a touchscreen, such as the display of a tablet computer.

[0033] Figure 2 provides a flowchart 200 illustrating exemplary operation associated with the implementation of this disclosure. After the program has started, in block 210, the method receives two operands (A, B) for processing as part of a mathematical operation such as VRP for calculating and returning the remainder of the operation A / B. The operands may be passed as regular functions of any underlying application program.

[0034] In block 220, the method supports estimating the number of digits in the quotient A / B and determining the difference between the operands. In one embodiment, the number of leading zeros for each operand is determined and the difference in the number of leading zeros is calculated. The method then simultaneously calculates the quotient A / B and the quotient digit estimate:#Quotient digits=(leading zeros B - leading zeros A, leading zeros B - leading zeros A+1).

[0035] In block 230, the method uses the value of the quotient digit to select from different multiplication algorithms for the back multiplication step of determining the remainder of A / B. In this step, the method compares the value of the quotient digit with a threshold of 4 and selects a multiplication algorithm accordingly. In one embodiment, the method selects digit-wise multiplication and sequential addition of partial products for quotient digit results less than 4, and multi-digit multiplication with a decimal reduction tree for quotient digit estimates of 4 or greater.

[0036] In block 240, the method applies the selected multiplication algorithm to perform back multiplication of the quotient * B, yielding the product P. In block 250, the method calculates the difference AP, yielding the remainder R, which is provided in block 260 as the output of a function such as VRP.

[0037] In one embodiment, all processing of the disclosed functions may occur as part of a single processor computing environment, or the processing may occur in the operation of a network processor system, including a system for a network processor incorporating a cloud infrastructure processor and other resources.

[0038] While this disclosure includes a detailed description of cloud computing, it should be understood that the implementation of the teachings described herein is not limited to cloud computing environments. Rather, embodiments of the present invention can be implemented in conjunction with any other type of computing environment currently known or to be developed in the future.

[0039] Cloud computing is a service delivery model that enables convenient on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be rapidly provisioned and deployed with minimal management effort or interaction with service providers. This cloud model may include at least five characteristics, at least three service models, and at least four deployment models.

[0040] The characteristics are as follows:

[0041] On-demand self-service: Cloud consumers can unilaterally provision computing power, such as server time and network storage, automatically as needed, without requiring human interaction with service providers.

[0042] Broad network access: This capability is available over the network and accessed through standard mechanisms that facilitate use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

[0043] Resource pooling: A provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically allocated and reallocated as needed. While consumers generally have no control or knowledge of the exact location of the resources provided, there is location independence in that they may be able to specify the location at a higher level of abstraction (e.g., country, state, or data center).

[0044] Rapid resilience: This capability allows for rapid and elastic provisioning, in some cases, automatically scaling out quickly and releasing quickly to scale in quickly. To consumers, the capacity available for provisioning often appears unlimited and can be purchased in any quantity at any time.

[0045] Measured Services: Cloud systems automatically control and optimize resource usage by leveraging metric capabilities at a level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency to both service providers and consumers.

[0046] The service model is as follows:

[0047] Software as a Service (SaaS): The capability offered to consumers is the use of a provider's applications running on cloud infrastructure. These applications are accessible from various client devices through thin client interfaces such as web browsers (e.g., web-based email). Consumers do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings.

[0048] Platform as a Service (PaaS): The capability offered to consumers is the ability to deploy applications they have created or acquired, written using programming languages ​​and tools supported by the provider, onto a cloud infrastructure. Consumers do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but they do control the deployed applications and, in some cases, the configuration of the application hosting environment.

[0049] Infrastructure as a Service (IaaS): The ability provided to consumers is the provisioning of processing, storage, networking, and other basic computing resources, where consumers can deploy and run any software, including operating systems and applications. Consumers do not manage or control the underlying cloud infrastructure, but they do control the operating system, storage, and deployed applications, and in some cases have limited control over selected networking components (e.g., host firewalls).

[0050] The deployment model is as follows:

[0051] Private Cloud: This cloud infrastructure operates solely for a specific organization. The private cloud may be managed by that organization or a third party and may reside on-premises or off-premises.

[0052] Community Cloud: This cloud infrastructure is shared by several organizations and supports specific communities that share common interests (e.g., mission, security requirements, policies, and compliance considerations). It may be managed by these organizations or third parties and may reside on-premises or off-premises.

[0053] Public Cloud: This cloud infrastructure is made available to the general public or large industry groups and is owned by an organization that sells cloud services.

[0054] Hybrid Cloud: This cloud infrastructure is a combination of two or more clouds (private, community, or public) that remain separate entities but are joined together by standard or proprietary technologies that enable data and application portability (e.g., cloud bursting for load balancing between clouds).

[0055] Cloud computing environments are service-oriented, focusing on statelessness, low coupling, modularity, and semantic interoperability. At the heart of cloud computing is the infrastructure, including a network of interconnected nodes.

[0056] Referring now to Figure 3, an exemplary cloud computing environment 50 is illustrated. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10 to which local computing devices used by cloud consumers, such as a personal digital assistant (PDA) or cellular phone 54A, a desktop computer 54B, a laptop computer 54C, or an automotive computer system 54N, or a combination thereof, can communicate. The nodes 10 may communicate with each other. They may be physically or virtually grouped within one or more networks, such as a private cloud, community cloud, public cloud, or hybrid cloud, or a combination thereof, as described above (not shown). This enables the cloud computing environment 50 to provide infrastructure, platforms, or software, or a combination thereof, as a service, eliminating the need for cloud consumers to maintain resources on their local computing devices. It should be understood that the types of computing devices 54A to N shown in Figure 3 are for illustrative purposes only, and that the computing node 10 and the cloud computing environment 50 may communicate with any type of computerized device via any type of network or network addressable connection (e.g., using a web browser) or both.

[0057] Referring now to Figure 4, we see a set of functional abstraction layers provided by the cloud computing environment 50 (Figure 3). It should be understood in advance that the components, layers, and functions shown in Figure 4 are for illustrative purposes only and that embodiments of the present invention are not limited thereto. As illustrated, the following layers and corresponding functions are provided:

[0058] The hardware and software layer 60 includes hardware components and software components. Examples of hardware components include a mainframe 61, RISC (Reduced Instruction Set Computer) architecture-based servers 62, 63, blade servers 64, storage devices 65, and network and networking components 66. In some embodiments, the software components include network application server software 67 and database software 68.

[0059] The virtualization layer 70 provides an abstraction layer that may provide examples of virtual entities, such as virtual servers 71, virtual storage 72, virtual networks 73 including virtual private networks, virtual applications and operating systems 74, and virtual clients 75.

[0060] In one example, the management layer 80 may provide the following functions: Resource provisioning 81 provides the dynamic procurement of computing and other resources used to perform tasks within the cloud computing environment. Measurement and pricing 82 determines the costs incurred when resources are used within the cloud computing environment and provides invoice generation or delivery for the consumption of these resources. In one example, these resources may include application software licenses. Security provides identity verification for cloud consumers and tasks, as well as protection for data and other resources. The user portal 83 provides access to the cloud computing environment for consumers and system administrators. Service level management 84 provides the allocation and management of cloud computing resources to ensure that the required service levels are met. Service level agreement (SLA) drafting and execution 85 prepares and procures cloud computing resources in advance, anticipating future requirements in accordance with the SLA.

[0061] The workload layer 90 provides examples of functions that can be utilized in a cloud computing environment. Examples of workloads and functions that can be provided from this layer include mapping and navigation 91; software development and lifecycle management 92; virtual classroom education delivery 93; data analysis processing 94; transaction processing 95; and multiplication algorithm selection program 175.

[0062] The present invention may be a system, method, or computer program product, or combination thereof, integrated at any conceivable level of technical detail. The present invention may be beneficially implemented in any system (single or in parallel) that processes instruction streams. The computer program product may include a computer-readable storage medium (or more mediums) having computer-readable program instructions that cause a processor to execute aspects of the present invention.

[0063] A computer-readable storage medium can be a tangible device capable of holding and storing instructions used by an instruction execution device. A computer-readable storage medium may be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any preferred combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes, namely, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital multipurpose disks (DVDs), memory sticks, floppy disks, mechanically encoded devices such as punch cards or grooved raised structures recording instructions, and any preferred combination of the foregoing. Computer-readable storage media or computer-readable storage devices are not, as used herein, construed as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses passing through optical fiber cables), or transient signals such as electrical signals transmitted through wires.

[0064] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof. The network may include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, or edge servers, or a combination thereof. A network adapter card or network interface within each computing / processing device receives computer-readable program instructions from the network and transfers the computer-readable program instructions for storage on a computer-readable storage medium within each computing / processing device.

[0065] The computer-readable program instructions for performing the operation of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for integrated circuits, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk® or C++, and procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer as a standalone software package, partially on the user's computer, partially on the user's computer and partially on a remote computer, or fully on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or wide area network (WAN), or the connection may be made to an external computer (for example, via the Internet using an Internet service provider). In some embodiments, an electronic circuit including, for example, a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA) may execute computer-readable program instructions by personalizing the electronic circuit using state information of computer-readable program instructions in order to perform aspects of the present invention.

[0066] Aspects of the present invention are described herein with reference to flowcharts or block diagrams or combinations thereof of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It will be understood that each block in a flowchart or block diagram or combination thereof, and any combination of blocks in a flowchart or block diagram or combination thereof, can be implemented by computer-readable program instructions.

[0067] These computer-readable program instructions may be provided to the processor of a general-purpose computer, a dedicated computer, or other programmable data processing device to generate a machine, so that instructions executed via the processor of the computer or other programmable data processing device create means for implementing functions / operations specified in one or more blocks of a flowchart or block diagram, or a combination thereof. These computer-readable program instructions may also be stored in a computer-readable storage medium that can instruct a computer, a programmable data processing device, or other device, or a combination thereof, to function in a particular manner, so that a computer-readable storage medium collectively storing instructions includes a manufactured article containing instructions for implementing modes of functions / operations specified in one or more blocks of a flowchart or block diagram, or both.

[0068] Furthermore, computer-readable program instructions can also be loaded into a computer, other programmable data processing device, or other device to generate a computer implementation process by executing a series of operational steps on the computer, other programmable device, or other device, thereby enabling the instructions executed on the computer, other programmable device, or other device to implement the functions / operations specified in one or more blocks of a flowchart or block diagram, or a combination thereof.

[0069] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions containing one or more executable instructions that implement a specified logical function. In some alternative implementations, the functions described in a block may be performed in an order different from the order shown in the drawings. For example, two blocks shown consecutively may actually be executed substantially simultaneously, and blocks may be executed in reverse order depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, or a combination thereof, and the combination of blocks in a block diagram or flowchart, or a combination thereof, may be implemented by a dedicated hardware-based system that performs a specified function or operation or executes a combination of dedicated hardware and computer instructions.

[0070] References in this specification to "one embodiment," "a certain embodiment," "an exemplary embodiment," etc., indicate that the embodiments described may include certain features, structures, or characteristics, but not all embodiments necessarily include those features, structures, or characteristics. Furthermore, such language does not necessarily refer to the same embodiment. Moreover, if a particular function, structure, or characteristic is described in relation to one embodiment, it is considered within the knowledge of those skilled in the art that such function, structure, or characteristic will be affected in relation to other embodiments, whether or not it is explicitly stated.

[0071] The terms used herein are intended to describe only specific embodiments and are not intended to limit the invention. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context explicitly indicates otherwise. It will be further understood that, as used herein, the terms "comprise" or "comprising," or both, specify the presence of a described feature, integer, step, action, element, or component or combination thereof, but do not exclude the presence or addition of one or more other features, integers, steps, actions, elements, components or groups or combinations thereof.

[0072] The descriptions of various embodiments of the present invention have been presented for illustrative purposes only and are not intended to be exhaustive or limit the scope to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the invention. The terms used herein have been selected to best describe the principles of the embodiments, their practical applications, or technical improvements to the technology available on the market, or to enable other those skilled in the art to understand the embodiments disclosed herein. [Item 1] A step in which operands A and B are received by one or more computer processors; The step of determining the difference between A and B using one or more computer processors as described above; The step of selecting a first multiplication algorithm when the above difference falls below a threshold by one or more computer processors; and The step of selecting a second multiplication algorithm if the above difference is greater than or equal to the above threshold by one or more of the above computer processors. A computer implementation method for the dynamic selection of a multiplication algorithm that includes [a specific feature]. [Item 2] The step of determining the difference between A and B above is: The step of determining the difference between the number of leading zeros for B and the number of leading zeros for A by one or more computer processors as described above. A computer implementation method as described in item 1, comprising: [Item 3] The above threshold is 4, according to the computer implementation method described in item 1 or 2. [Item 4] The first multiplication algorithm described above is a computer implementation method according to item 1 or 2, comprising digit-wise multiplication and sequential addition of partial products. [Item 5] The computer implementation method described in item 1 or 2, wherein the second multiplication algorithm has multi-digit multiplication combined with a decimal reduction tree. [Item 6] The computer implementation method according to item 1 or 2, further comprising: a step of calculating a quotient of A and B using one or more computer processors; a step of back-multiplying the quotient and B using the first multiplication algorithm or the second multiplication algorithm corresponding to the difference using one or more computer processors; a step of determining a second difference of the product of the quotient and B from A using one or more computer processors; and a step of providing the second difference as an output using one or more computer processors. [Item 7] A computer program for the dynamic selection of a multiplication algorithm, wherein the processor... Procedure for receiving operands A and B; Procedure for determining the difference between A and B; A procedure for estimating the number of digits in the quotient based on the difference between A and B above; A procedure for selecting a first multiplication algorithm if the above difference falls below a threshold; and The procedure for selecting a second multiplication algorithm if the above difference is greater than or equal to the above threshold. A computer program designed to execute something. [Item 8] The procedure for determining the difference between A and B above is: Procedure for determining the difference between the number of leading zeros for B and the number of leading zeros for A. A computer program having the characteristics described in item 7. [Item 9] The above threshold is 4, for the computer program described in item 7 or 8. [Item 10] The first multiplication algorithm described above is a computer program as described in item 7 or 8, having digit-wise multiplication and sequential addition of partial products. [Item 11] The second multiplication algorithm described above is a computer program as described in item 7 or 8, which has multi-digit multiplication in combination with a decimal reduction tree. [Item 12] A computer program according to item 7 or 8, which causes the above processor to calculate the above quotient of A and B; and to back-multiply the above quotient and B using the above first multiplication algorithm or the above second multiplication algorithm corresponding to the above difference; to determine a second difference of the product of the above quotient and B from A; and to provide the above second difference as an output. [Item 13] A computer system for the dynamic selection of multiplication algorithms, wherein the computer system is One or more computer processors; One or more computer-readable storage devices; and If executed, the above one or more computer processors will Receive operands A and B; Determine the difference between A and B; Estimate the number of digits in the quotient based on the difference between A and B above; If the above difference falls below the threshold, select the first multiplication algorithm; and If the above difference is greater than or equal to the above threshold, the second multiplication algorithm is selected. Program instructions stored on one or more computer-readable storage devices as described above A computer system equipped with the following features. [Item 14] Determining the difference between A and B above is, Determine the difference between the number of leading zeros for B and the number of leading zeros for A. A computer system as described in item 13, having the following features. [Item 15] The above threshold is 4, as described in item 13 or 14 for the computer system. [Item 16] The first multiplication algorithm described above is a computer system according to item 13 or 14, having digit-wise multiplication and sequential addition of partial products. [Item 17] The computer system described in item 13 or 14, wherein the second multiplication algorithm described above has multi-digit multiplication in combination with a decimal reduction tree. [Item 18] The computer system according to item 13 or 14, wherein the stored program instructions further cause one or more computer processors to calculate the quotient of A and B; back-multiply the quotient and B using the first or second multiplication algorithm corresponding to the difference; determine a second difference of the product of the quotient and B from A; and provide the second difference as an output. [Item 19] The stage where operands A and B are received; The stage of determining the difference between A and B; The step of estimating the number of digits in the quotient based on the difference between A and B above; The step of selecting a first multiplication algorithm if the number of digits in the estimated quotient falls below a threshold; and If the number of digits in the estimated quotient is greater than or equal to the threshold, then a second multiplication algorithm is selected. A computer implementation method for the dynamic selection of a multiplication algorithm that includes [a specific feature]. [Item 20] The step of determining the difference between A and B above is: The stage of determining the difference between the number of leading zeros for B and the number of leading zeros for A. A computer implementation method as described in item 19, having the following characteristics. [Item 21] The first multiplication algorithm described above is a computer implementation method according to item 19 or 20, comprising digit-wise multiplication and sequential addition of partial products. [Item 22] The computer implementation method described in item 19 or 20, wherein the second multiplication algorithm has multi-digit multiplication combined with a decimal reduction tree. [Item 23] The stage where operands A and B are received; The stage of determining the difference between A and B; If the above difference falls below a threshold, the first multiplication algorithm is selected; If the above difference is greater than or equal to the above threshold, the next step is to select a second multiplication algorithm; The step of prescaling operands A and B above; The step of calculating the quotient for the above operands A and B; Using the algorithm selected above, the quotient and operand B are back-multiplied to obtain the product; The step of subtracting the above product from operand A and obtaining a remainder; and The stage of providing the above remainder as output. A computer implementation method for the dynamic selection of a multiplication algorithm that includes [a specific feature]. [Item 24] The step of determining the difference between A and B above is: The stage of determining the difference between the number of leading zeros for B and the number of leading zeros for A. A computer implementation method as described in item 23, having the following characteristics. [Item 25] The above threshold is 4, as described in item 23 or 24, for the computer implementation method.

Claims

1. A step in which operands A and B are received by one or more computer processors; A step in which the difference between A and B is determined by the one or more computer processors mentioned above; The step of selecting a digit-by-digit multiplication algorithm by the one or more computer processors mentioned above if the difference falls below a threshold; The step of selecting a multi-digit multiplication algorithm by the one or more computer processors if the difference is greater than or equal to the threshold; A step in which the one or more computer processors determine the product of B and the quotient obtained by dividing A by B using the selected algorithm; A step in which the one or more computer processors determine a second difference between the product and A; and The step of providing the second difference as an output by the one or more computer processors; A computer implementation method for the dynamic selection of a multiplication algorithm that includes [a specific feature].

2. A step of receiving operands A and B by one or more computer processors; A step in which the difference between A and B is determined by the one or more computer processors mentioned above; The step of selecting a first multiplication algorithm by the one or more computer processors if the difference falls below a threshold; and The step of selecting a second multiplication algorithm by the one or more computer processors if the difference is greater than or equal to the threshold. Equipped with, The step of determining the difference between A and B is: The step of determining the difference between the number of leading zeros for B and the number of leading zeros for A using one or more computer processors. A computer implementation method for the dynamic selection of a multiplication algorithm, having the following characteristics.

3. A step of receiving operands A and B by one or more computer processors; A step in which the difference between A and B is determined by the one or more computer processors mentioned above; The step of selecting a first multiplication algorithm by the one or more computer processors if the difference falls below a threshold; and The step of selecting a second multiplication algorithm by the one or more computer processors if the difference is greater than or equal to the threshold. Equipped with, A computer implementation method for the dynamic selection of a multiplication algorithm, wherein the threshold is 4.

4. A step of receiving operands A and B by one or more computer processors; A step in which the difference between A and B is determined by the one or more computer processors mentioned above; The step of selecting a first multiplication algorithm by the one or more computer processors if the difference falls below a threshold; and The step of selecting a second multiplication algorithm by the one or more computer processors if the difference is greater than or equal to the threshold. Equipped with, The first multiplication algorithm is a computer implementation method for dynamic selection of a multiplication algorithm, comprising digit-wise multiplication and sequential addition of partial products.

5. A step of receiving operands A and B by one or more computer processors; A step in which the difference between A and B is determined by the one or more computer processors mentioned above; The step of selecting a first multiplication algorithm by the one or more computer processors if the difference falls below a threshold; and The step of selecting a second multiplication algorithm by the one or more computer processors if the difference is greater than or equal to the threshold. Equipped with, The second multiplication algorithm is a computer implementation method for dynamic selection of a multiplication algorithm, having multi-digit multiplication combined with a decimal reduction tree.

6. A step of receiving operands A and B by one or more computer processors; A step in which the difference between A and B is determined by the one or more computer processors mentioned above; The step of selecting a first multiplication algorithm by the one or more computer processors if the difference falls below a threshold; and The step of selecting a second multiplication algorithm by the one or more computer processors if the difference is greater than or equal to the threshold. Equipped with, A computer implementation method for dynamic selection of a multiplication algorithm, further comprising the steps of: calculating a quotient of A and B using one or more computer processors; back-multiplying the quotient and B using one or more computer processors with respect to the difference using a first multiplication algorithm or a second multiplication algorithm; determining a second difference of the product of the quotient and B from A using one or more computer processors; and providing the second difference as an output using one or more computer processors.

7. A computer program for the dynamic selection of a multiplication algorithm, wherein the processor... Procedure for receiving operands A and B; Procedure for determining the difference between A and B; A procedure for estimating the number of digits in the quotient according to the difference between A and B; A procedure for selecting a first multiplication algorithm when the difference falls below a threshold; and A procedure for selecting a second multiplication algorithm when the difference is greater than or equal to the threshold. A computer program designed to execute something.

8. The procedure for determining the difference between A and B is as follows: Procedure for determining the difference between the number of leading zeros for B and the number of leading zeros for A. A computer program according to claim 7, having the following characteristics.

9. The computer program according to claim 7 or 8, wherein the threshold is 4.

10. The computer program according to claim 7 or 8, wherein the first multiplication algorithm comprises digit-wise multiplication and sequential addition of partial products.

11. The computer program according to claim 7 or 8, wherein the second multiplication algorithm has multi-digit multiplication in combination with a decimal reduction tree.

12. The computer program according to claim 7 or 8, wherein the processor is caused to calculate the quotient of A and B; and to back-multiply the quotient and B using the first multiplication algorithm or the second multiplication algorithm corresponding to the difference; to determine a second difference of the product of the quotient and B from A; and to provide the second difference as an output.

13. A computer system for the dynamic selection of multiplication algorithms, wherein the computer system is One or more computer processors; One or more computer-readable storage devices; and If executed, the one or more computer processors will Receive operands A and B; Determine the difference between A and B; The number of digits in the quotient is estimated according to the difference between A and B; If the difference falls below a threshold, the first multiplication algorithm is selected; and If the difference is greater than or equal to the threshold, the second multiplication algorithm is selected. Program instructions stored on the one or more computer-readable storage devices A computer system equipped with the following features.

14. Determining the difference between A and B is, Determine the difference between the number of leading zeros for B and the number of leading zeros for A. The computer system according to claim 13, having the following features.

15. The computer system according to claim 13 or 14, wherein the threshold is 4.

16. The computer system according to claim 13 or 14, wherein the first multiplication algorithm comprises digit-wise multiplication and sequential addition of partial products.

17. The computer system according to claim 13 or 14, wherein the second multiplication algorithm has multi-digit multiplication in combination with a decimal reduction tree.

18. The computer system according to claim 13 or 14, wherein the stored program instructions further cause the one or more computer processors to calculate the quotient of A and B; back-multiply the quotient and B using the first or second multiplication algorithm corresponding to the difference; determine a second difference of the product of the quotient and B from A; and provide the second difference as an output.

19. The stage of receiving operands A and B; The stage of determining the difference between A and B; A step in which the number of digits in the quotient is estimated according to the difference between A and B; The step of selecting a first multiplication algorithm if the number of digits in the estimated quotient falls below a threshold; and If the number of digits in the estimated quotient is greater than or equal to the threshold, the step of selecting a second multiplication algorithm. A computer implementation method for the dynamic selection of a multiplication algorithm that includes [a specific feature].

20. The step of determining the difference between A and B is: The stage of determining the difference between the number of leading zeros for B and the number of leading zeros for A. A computer implementation method according to claim 19, comprising:

21. The computer implementation method according to claim 19 or 20, wherein the first multiplication algorithm comprises digit-wise multiplication and sequential addition of partial products.

22. The computer implementation method according to claim 19 or 20, wherein the second multiplication algorithm has multi-digit multiplication in combination with a decimal reduction tree.

23. The stage where operands A and B are received; The stage of determining the difference between A and B; If the difference falls below a threshold, the first multiplication algorithm is selected; If the difference is greater than or equal to the threshold, a second multiplication algorithm is selected; A step of prescaling operands A and B; A step of calculating the quotient for operands A and B; The step of back-multiplying the quotient and operand B using the selected algorithm to obtain the product; The step of subtracting the product from operand A to obtain a remainder; and The step of providing the surplus as an output. A computer implementation method for the dynamic selection of a multiplication algorithm that includes [a specific feature].

24. The step of determining the difference between A and B is: The stage of determining the difference between the number of leading zeros for B and the number of leading zeros for A. A computer implementation method according to claim 23, comprising:

25. The computer implementation method according to claim 23 or 24, wherein the threshold is 4.

Citation Information

Patent Citations

  • Dsp engine with implicit mixed operands

    CN102356378A

  • Decimal multiplication processor

    JP1995287649A

  • Arithmetic circuit

    JP2000187584A

  • Arithmetic circuit and arithmetic method

    JP2013210837A

  • An electronic computing device arranged to calculate products of integers

    JP2020515928A