Execution of a conditional statement by an arithmetic and / or bitwise unit

TW202219739AUndetermined Publication Date: 2022-05-16CHARIOT TECHNOLOGIES LAB INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
TW · TW
Patent Type
Applications
Current Assignee / Owner
Filing Date
2021-10-14
Publication Date
2022-05-16

Smart Images

  • Figure TWG2TA000859110_001
    Figure TWG2TA000859110_001
  • Figure TWG2TA000859110_002
    Figure TWG2TA000859110_002
  • Figure TWG2TA000859110_003
    Figure TWG2TA000859110_003
Patent Text Reader

Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for execution of a conditional statement by an arithmetic and / or bitwise unit. A computer program that comprises a conditional statement that comprises a Boolean condition is accessed. The Boolean condition is transformed into an arithmetic and / or bitwise expression of the Boolean condition. An arithmetic and / or bitwise expression of the computer program comprises the arithmetic and / or bitwise expression of the Boolean condition in place of the Boolean condition. The arithmetic and / or bitwise expression of the computer program is executed by an arithmetic and / or bitwise operation unit of a processor.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This description generally relates to computing systems, and more specifically to the execution of conditional statements and expressions by computing circuits. [Previous Technology]

[0002] In computer science, conditional statements are a feature of programming languages, which perform different computations or actions depending on whether the specified Boolean condition evaluates to True or False.

[0003] The execution of a condition statement requires the evaluation of the Boolean condition, which necessitates comparing numbers. This comparison determines whether one number is greater than, equal to, or less than another number. The Boolean condition is typically evaluated using a bitwise comparator. A bitwise comparator is a hardware electronic device that takes two numbers as input in binary form and determines whether one number is greater than, less than, or equal to the other.

[0004] Conditional statements use the output of a bit comparator to switch to executing one piece of computer code or another. Each overall "if-then do" operation of a bit comparator requires at least two clock cycles from the processor. Furthermore, bit comparators often cannot execute multi-level conditional tasks in parallel. Therefore, bit comparators (or logic blocks of the ALU) often constitute a bottleneck for integrated circuit processors. [Summary of the Invention]

[0005] This specification describes how a system can execute a computer program, including conditional statements, using only the processor's arithmetic block and / or bitwise unit.

[0006] Specific embodiments of the subject matter described in this specification may be implemented to achieve one or more of the following advantages.

[0007] The conditional statement is transformed into a set of arithmetic and / or bitwise operations. Therefore, a computer program can be executed independently by the processor's arithmetic and / or bitwise unit. Specifically, a computer program can be executed without using a bit comparator. As mentioned above, each overall operation of a bit comparator requires at least two clock cycles from the processor. On the other hand, the processor's arithmetic unit can perform most arithmetic calculations within one clock cycle. Therefore, the technique described in this specification improves the processor's execution speed of computer programs. The bit comparator can be removed, thereby providing more space for the arithmetic and / or bitwise operation unit. For a constant chip size, this can therefore increase the chip's power, thereby improving execution speed.

[0008] Furthermore, bit comparators often cannot execute multi-level conditional tasks in parallel. Therefore, bit comparators often constitute a bottleneck for integrated circuit processors. On the other hand, arithmetic and / or bitwise expressions can be segmented into multiple segments, which can then be executed in parallel by multiple arithmetic and / or bitwise blocks. Therefore, the techniques described in this specification can further improve the processor's execution speed by executing computer programs through multiple parallel-working arithmetic blocks.

[0009] This method can be used with any suitable programming language at any level. Specifically, this method can be used with any suitable low-level language (e.g., assembly language, or language at the instruction set architecture (ISA) level) and any suitable high-level programming language (e.g., C++ code or Java, etc.) for a particular software program.

[0010] Details of one or more embodiments of the subject matter of this specification are set forth in the accompanying drawings and the following description. Other features, aspects, and advantages of the subject matter will become apparent from the description, the drawings, and the claims.

Implementation Method

[0026] Figure 1 is a diagram illustrating an example system 100. System 100 is an example of a system that can implement the techniques described in this specification.

[0027] System 100 includes a processor 110, such as a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Neural Processing Unit (NPU), Tensor Processor Unit (TPU), or any other type of processing unit capable of performing conditional tasks. The processor executes basic arithmetic, logic, control, and input / output (I / O) operations specified by instructions in computer program 182. Processor 110 may be a microprocessor, wherein the CPU is contained on a single metal-oxide-semiconductor (MOS) integrated circuit (IC) chip 160. The IC containing the CPU may also include memory cells 150 such as dynamic random-access memory (DRAM) and more than one layer of cache memory, and peripheral interfaces for connection to input device 180 or output device 190.

[0028] The processor 110 includes multiple functional components, including one or more arithmetic and / or bitwise operation units (ABUs) 130 that perform arithmetic and bitwise logic operations, one or more registers 140 that provide operands to the ABUs 130 and store the results of the ABU operations, and one or more control units (CUs) 120 that coordinate the execution of instructions by guiding the coordinated operations of the ABUs 130, the registers 140 and other components.

[0029] ABU 130 is a digital circuit that performs arithmetic and / or bitwise logic operations. ABU 130 may include one or more arithmetic blocks 131, one or more bitwise shift blocks 132, and one or more bitwise logic blocks 133. Arithmetic blocks 131 perform arithmetic operations such as addition, addition with carry, subtraction, and subtraction with borrow. Bitwise shift blocks 132 perform bitwise shift operations such as arithmetic shift, logical shift, rotation, and rotation by carry. Bitwise logic blocks 133 perform bitwise logic operations such as AND, OR, and exclusive-OR. In some embodiments, ABU 130 does not include any bitwise comparators. In some embodiments, processor 110 does not include any bitwise comparators.

[0030] In operation, processor 110 accesses and executes computer program 182, which includes a sequence of instructions. Computer program 182 can be accessed from memory unit 150 or from input device 180. The processor can follow an instruction cycle, including fetch, decode, and execute steps. Multiple instructions can be fetched, decoded, and executed simultaneously. Execution steps can consist of a single action or a sequence of actions. During each action, different parts of the processor are electrically connected, so they can perform all or part of the required operations, and then complete the action. The result can be written to one of temporary registers 140 or memory unit 150.

[0031] The CU 120 directs the operation of the processor 110. The CU 120 controls the memory 150 and the ABU 130 in response to the computer program 182 accessed by the processor. Specifically, the CU 120 can direct the operation of other units by providing timing and control signals.

[0032] In some embodiments, CU 120 includes a transformation unit 121 that transforms computer program 182 into an arithmetic and / or bitwise expression 122 of the computer program. Transformation unit 121 identifies conditional statements found in computer program 182 and transforms them into arithmetic and / or bitwise expressions of those conditional statements. Transformation unit 121 generates the arithmetic and / or bitwise expression 122 of computer program 182 based on arithmetic and / or bitwise operations and operands. CU 120 then provides the arithmetic and / or bitwise expression 122 of computer program 182 to ABU 130. In other embodiments, the system includes a separate data processing device that identifies conditional statements found in computer program 182 and transforms them into arithmetic and / or bitwise expressions of those conditional statements.

[0033] In some embodiments, the arithmetic and / or bitwise expressions of the conditional statements include only arithmetic and / or bitwise operations. In some embodiments, substantially all conditional statements (e.g., more than 50%, more than 60%, more than 70%, more than 80%, more than 90%, or more than 95%) are transformed, but some conditional statements need not be transformed if the processor still includes a bit compactor that can be used to evaluate an appropriate subset of the definition of the conditional statements.

[0034] The ABU 130 accesses arithmetic and / or bitwise expressions 122 from the computer program 182 of the CU 120. The ABU 130 can access operands from the register 140 or the memory unit 150. Operands can also be constants generated by the ABU 130 itself. The ABU 130 can also access status information, which conveys information about previous or current operations. The ABU 130 outputs the result of the performed operation. The result can consist of a data word and / or status information. The result can be stored in the register 140 or the memory unit 150.

[0035] Figure 2 is a flowchart of an example process of executing a computer program. This process can be implemented by one or more computer programs installed on one or more computers in one or more locations and programmed according to this specification. For example, the process can be executed by system 100 shown in Figure 1. For convenience, the process will be described as being executed by a system of one or more computers. Some embodiments involve preprocessing the computer program before the transformed computer program is executed on system 100, for example, to perform the transformation on a completely different computer system. For example, the source compiler may perform the transformation when generating object code and / or machine-level code for the target computer.

[0036] The system accesses (210) the computer program (e.g., computer program 182 in Figure 1). The system determines (205) whether the computer program includes at least one conditional statement that includes a Boolean condition. If the computer program includes at least one conditional statement, the system transforms (220) the Boolean condition into an arithmetic and / or bitwise expression of the Boolean condition. If the computer program does not include any conditional statement, the system provides (240) the computer's arithmetic and / or bitwise expression to the ABU 130 for execution.

[0037] During execution, the conditional statement causes the processor to perform an associated task depending on whether the specified Boolean condition evaluates to True or False. The task may include one or more computations and / or one or more actions. The specified Boolean condition requires comparing at least one variable with a value or another variable. For example, the comparison may determine whether the value of a variable (e.g., A) is greater than (e.g., A > B), equal to (e.g., A = B), or less than (e.g., A < B) the value of another variable (e.g., B). The result of the comparison with the associated task that the processor will perform determines this.

[0038] Figure 3 is pseudocode illustrating the basic structure of an if-then (-else) conditional statement 310. When the interpreter encounters an If condition, it expects a Boolean condition 301 and evaluates it to either True or False. If the condition is True, the processor executes the subsequent task 302. Otherwise, execution continues in the next branch. If an alternative task 303 exists (e.g., in an Else block), the processor executes the alternative task 303. If no Else branch exists, the processor executes the statement following End If. After either branch is executed, control returns to the point following the end If.

[0039] Referring again to Figure 2, the system (e.g., transformation unit 121) transforms the Boolean condition (220) into an arithmetic and / or bitwise expression of the Boolean condition. The arithmetic and / or bitwise expression of the Boolean condition uses the variables of the condition statement as variables. In some implementations, the arithmetic and / or bitwise expression of the Boolean condition makes the output of the arithmetic and / or bitwise expression of the Boolean condition verify the following two properties: If the value of the variable verifies the Boolean condition, the arithmetic and / or bitwise expression of the Boolean condition equals 1. If the value of the variable does not verify the Boolean condition, the arithmetic and / or bitwise expression of the Boolean condition equals 0. Therefore, the Boolean value TRUE is converted to 1, and the Boolean value FALSE is converted to 0. During execution, the arithmetic and / or bitwise expression of the Boolean condition retains the executable portion of the executable code while clearing the non-executable portion. The transformation of the Boolean condition statement into an arithmetic and / or bitwise expression is described in more detail with reference to Figure 4.

[0040] The transformation can be performed in any suitable programming language at any level. Specifically, the method can be used in any suitable low-level language (e.g., a composition language, or at the instruction set architecture (ISA) level) and any suitable high-level programming language (e.g., C++ code or Java, etc.) for a particular software program. This process can be performed as a preprocessing step when compiling the source code into executable code for the target machine, or as an just-in-time processing step when implemented in an interpreter rather than a compiler.

[0041] The following provides examples of specific and general transformation formulas that can be used to transform Boolean conditions into arithmetic and / or bitwise expressions.

[0042] Examples of specific transformation formulas (at ASM and / or ISA levels). Specific transformation formulas for integer, character, or Boolean types: Answer = (for x = y and x >= y conditions) Answer = (for other conditions) Specific transformation formulas for floating or dual types (floating-point data): Answer = (for x = y and x >= y conditions) Answer = (for other conditions)

[0043] Example of a general transformation formula for all data types (including arrays and strings): General transformation answer for the Bolin condition "if(=)" = General transformation answer for the Bolin condition "if(>=)" = General transformation answer for the Bolin condition "if(<)" = General transformation answer for the Bolin condition "if(>)" = Symbols: - z is the base. - A and B are arrays containing N elements. - A[i] and B[i] are elements of the array. For example, integers, floating-point numbers, etc., are one-dimensional arrays (column vector matrices) with only one element. - The answer is the arithmetic and / or bitwise expression of the Bolin condition. - % is the remainder of division. - ceil(x) is the top function, which maps x to the smallest integer greater than or equal to x. - If the Bolin condition is x=y, then k=xy. - If the Bolin condition is x≥y, then k=(xy)-(|xy|). - x<y is the "else" result of x≥y.

[0044] The base z can be the base of a number system. Most arithmetic operations with a number system base (such as power functions and remainders of division) can be calculated immediately by shift operations. Specifically, if the processor uses a binary system, z can be equal to 2.

[0045] In the case of arrays and strings, the elements of the array can be normalized. Any known normalization method can be used. This improves the execution speed of the condition statement.

[0046] Referring back to Figure 2, the system (e.g., transformation unit 121) generates (230) an arithmetic and / or bitwise expression for the computer program. The system replaces the Boolean conditions in the computer program with the arithmetic and / or bitwise expressions of the Boolean conditions. During execution, the arithmetic and / or bitwise expressions of the Boolean conditions retain the executable portions of the executable code while clearing the portions that are not executable. The generation of the arithmetic and / or bitwise expressions for the computer program is described in more detail with reference to Figures 8 and 9.

[0047] The system (e.g., CU 120) provides (240) arithmetic and / or bitwise expressions of a computer program to an arithmetic and / or bitwise unit (e.g., ABU 130) for execution. The arithmetic and / or bitwise expressions of the computer program can be in any suitable programming language for the particular software program, specifically any suitable low-level language (e.g., assembly language, or at the level of instruction set architecture (ISA)) and any suitable high-level programming language (e.g., C++ code or Java, etc.). Execution of the arithmetic and / or bitwise expressions of the computer program does not require any direct numerical comparison. The system can therefore provide the arithmetic and / or bitwise expressions of the computer program to the arithmetic and / or bitwise unit, specifically the arithmetic and / or bitwise unit that does not include any bitwise comparator.

[0048] The system (e.g., ABU 130) executes (250) arithmetic and / or bitwise expressions of a computer program. Execution of the arithmetic and / or bitwise expressions of a conditional statement provides the same result as execution of the conditional statement without requiring any numeric comparison. Therefore, a processor that does not include any bitwise comparators can execute a computer program. Execution of conditional statements with arithmetic bodies is described in more detail with respect to Figures 11A and 11B. Execution of conditional statements with non-arithmetic bodies is described in more detail with respect to Figures 12A and 12B. As described in more detail with respect to Figure 10, the arithmetic and / or bitwise expressions of a computer program can be segmented and these segments can be executed in parallel (e.g., simultaneously or concurrently), particularly in the case of multi-level conditional statements.

[0049] Figure 4 is a flowchart of an instance process for transforming a Bollinger condition (e.g., 220 in Figure 2) into an arithmetic and / or bitwise expression. The Bollinger condition uses A as the first variable and B as the second variable.

[0050] The system (e.g., transformation unit 121) subtracts (410) B from A.

[0051] The system (e.g., transformation unit 121) calculates the absolute value of the subtraction result (420).

[0052] The system (e.g., transformation unit 121) calculates (430) the exponent based on the absolute value of the subtraction result.

[0053] The system (e.g., transformation unit 121) calculates the (440) exponent by raising the calculated exponent to the power of the base. The base can be any number. Specifically, the base can be the base of the number system used by the processor. Specifically, if the processor uses a binary system, the base can be equal to 2. Most arithmetic operations with a base of a number system (e.g., power functions and remainders of division) can be calculated immediately by shifting operations. Specifically, raising the calculated exponent to the power of the base can be performed by shifting the bits equal to 1 to the left by the number of bits of the calculated exponent. This improves execution speed.

[0054] The system (e.g., transformation unit 121) calculates (450) the arithmetic and / or bitwise expression of the Bollinger condition as the remainder when the exponent is divided by the base.

[0055] If the Bollinger condition is validated, the exponent is calculated such that the exponent equals 0. Any number raised to the power of 0 will result in 1. Therefore, if the Bollinger condition is validated, the exponent equals 0, and the arithmetic and / or bitwise expression of the Bollinger condition will equal 1.

[0056] In some embodiments, the base is 2. If the processor uses a binary system, the square root of the remainder when the last bit of the exponent is divided by the base can be taken. This reduces the computational complexity.

[0057] Figure 5 is a flowchart of an example process of transforming the Boolean condition A = B into an arithmetic and / or bitwise expression of A = B.

[0058] The system (e.g., transformation unit 121) subtracts (510) B from A.

[0059] The system (e.g., transformation unit 121) calculates the absolute value of the result of (520) with an exponent of 510.

[0060] The system (e.g., transformation unit 121) calculates the (530) exponent by raising the exponent calculated in 520 to the power of the base.

[0061] The system (e.g., transformation unit 121) calculates (540) the arithmetic and / or bitwise expression of the Bollinger condition as the remainder of the exponent calculated in 530 divided by the base.

[0062] Calculate the arithmetic and / or bitwise expression of A = B to verify the following: If A = B, then the exponent is 0, and the arithmetic and / or bitwise expression of A = B is 1. If A ≠ B, then the exponent is not 0, and the arithmetic and / or bitwise expression of A = B is 0.

[0063] Figure 6 is a flowchart of an example process of transforming the Boolean condition A ≥ B into an arithmetic and / or bitwise expression of A ≥ B.

[0064] The system (e.g., transformation unit 121) subtracts (610) B from A.

[0065] The system (e.g., transformation unit 121) calculates the absolute value of the result of (620) 610.

[0066] The system (e.g., transformation unit 121) subtracts the result of (630) 610 from the result of 620.

[0067] The system (e.g., transformation unit 121) calculates the absolute value of the result with an exponent of 630 (640).

[0068] The system (e.g., transformation unit 121) calculates the (650) exponent by raising the exponent calculated at 640 to the power of the base.

[0069] The system (e.g., transformation unit 121) calculates (660) the arithmetic and / or bitwise expression of the Bollinger condition as the remainder of the exponent calculated in 650 divided by the base.

[0070] Calculate the arithmetic and / or bitwise expression of A ≥ B to verify the following: If A ≥ B, then the exponent is 0, and the arithmetic and / or bitwise expression of A ≥ B is 1. If A < B, then the exponent is not 0, and the arithmetic and / or bitwise expression of A ≥ B is 0.

[0071] Figure 7A is a flowchart of an example process of transforming the Bollinger condition A < B into an arithmetic and / or bitwise expression of A < B.

[0072] The system (e.g., transformation unit 121) subtracts (710) B from A.

[0073] The system (e.g., transformation unit 121) calculates the absolute value of the result of (720) 710.

[0074] The system (e.g., transformation unit 121) subtracts the result of (730) 710 from the result of 720.

[0075] The system (e.g., transformation unit 121) calculates the absolute value of the result with an exponent of 730 (740).

[0076] The system (e.g., transformation unit 121) calculates the (750) exponent by raising the exponent calculated at 740 to the power of the base.

[0077] The system (e.g., transformation unit 121) calculates (760) the arithmetic and / or bitwise expression of the Bollinger condition as the remainder of the exponent calculated at 750 divided by the base.

[0078] Calculate the arithmetic and / or bitwise expression for A < B to verify the following: If A < B, the exponent is equal to 0, and the arithmetic and / or bitwise expression for the Boolean condition is equal to 1. If A ≥ B, the exponent is not equal to 0, and the arithmetic and / or bitwise expression for the Boolean condition will be equal to 0.

[0079] Figure 7B is a flowchart of another instance of the process of transforming the Boolean condition A < B into an arithmetic and / or bitwise expression of A < B.

[0080] The system (e.g., transformation unit 121) subtracts (710B) B from A.

[0081] The system (e.g., transformation unit 121) calculates the borrow value of the arithmetic and / or bitwise expression of the (720B) Bollinger condition as the result of subtracting B from A.

[0082] Calculate the arithmetic and / or bitwise expression for A < B, thereby verifying the following: If A < B, then the borrow value of the result of A minus B is equal to 1, and the arithmetic and / or bitwise expression of the Boolean condition is equal to 1. If A ≥ B, then the borrow value of the result of A minus B is equal to 0, and the arithmetic and / or bitwise expression of the Boolean condition is equal to 0.

[0083] Figure 8 is a flowchart of an example process for generating an arithmetic and / or bitwise expression of a computer program when the conditional statement has an arithmetic body (e.g., 230 in Figure 2). Examples are described in more detail with respect to Figures 11A and 11B.

[0084] The system (e.g., transformation unit 121) multiplies the description of the subsequent task (e.g., 302 in Figure 3) with the arithmetic and / or bitwise expression of the Boolean condition (810). Therefore, when the computer program is executed, the following occurs: If the Boolean condition is validated, the arithmetic and / or bitwise expression of the Boolean condition equals 1, the subsequent task is maintained by multiplying it with the arithmetic and / or bitwise expression of the Boolean condition, and the subsequent task is executed. If the Boolean condition is not validated, the arithmetic and / or bitwise expression of the Boolean condition equals 0, the subsequent task is invalidated by multiplying it with the arithmetic and / or bitwise expression of the Boolean condition, and the subsequent task is not executed.

[0085] If the condition description includes an alternative task expressed as an arithmetic description (e.g., 303 in Figure 3), the system (e.g., transformation unit 121) multiplies the arithmetic subsequent task by 1 minus the arithmetic and / or bitwise expression of the Boolean condition (820). Therefore, when the computer program is executed, the following occurs: If the Boolean condition is validated, the arithmetic and / or bitwise expression of the Boolean condition equals 1. The subsequent task is maintained by multiplying by the arithmetic and / or bitwise expression of the Boolean condition, while the alternative task is invalidated by multiplying by 1 minus the arithmetic and / or bitwise expression of the Boolean condition. Therefore, the subsequent task is executed, but the alternative task is not. If the Boolean condition is not validated, the arithmetic and / or bitwise expression of the Boolean condition equals 0, the subsequent task is invalidated by multiplying by the arithmetic and / or bitwise expression of the Boolean condition, while the alternative task is maintained by multiplying by the arithmetic and / or bitwise expression of the Boolean condition. Therefore, the alternative task is performed instead of the subsequent task.

[0086] Figure 9 is a flowchart of an example process for generating an arithmetic and / or bitwise expression of a computer program when the conditional statement has a non-arithmic body (e.g., 230 in Figure 2). Examples are described in more detail with respect to Figures 12A and 12B.

[0087] The system (e.g., transformation unit 121) includes an unconditional jump to a label associated with the arithmetic and / or bitwise expression of the Boolean condition in the arithmetic and / or bitwise expression of the Boolean condition. The label is initiated using the arithmetic and / or bitwise expression of the Boolean condition such that when the arithmetic and / or bitwise expression of the condition statement equals 1, the label equals the start statement of the subsequent task (e.g., 302 in Figure 3). Therefore, when the computer program is executed, the following occurs: If the Boolean condition is validated, the arithmetic and / or bitwise expression of the Boolean condition equals 1. The label equals the start statement of the subsequent task. The unconditional jump statement points to the subsequent task. During execution, when the processor encounters the unconditional jump statement, the processor executes the subsequent task.

[0088] If an alternative task exists (e.g., 303 in Figure 3), the label is further activated such that when the arithmetic and / or bitwise expression of the condition statement equals 0, the label equals the start statement of the alternative task. Therefore, when the computer program is executed, the following occurs: If the Boolean condition is validated, the arithmetic and / or bitwise expression of the Boolean condition equals 1, the label equals the start statement of the subsequent task, the unconditional jump statement points to the subsequent task, and the subsequent task is executed. If the condition statement is not validated, the arithmetic and / or bitwise expression of the Boolean condition equals 0, the label equals the start statement of the alternative task, the jump statement points to the alternative task, and the alternative task is executed.

[0089] Figure 10 is a flowchart of an example process of providing (e.g., 240 in Figure 2) an arithmetic and / or bitwise expression of a computer program and executing (e.g., 250 in Figure 2) an arithmetic and / or bitwise expression of the computer program as appropriate. The arithmetic and / or bitwise expression is segmented. Multiple segments can then be executed in parallel by multiple arithmetic and / or bitwise blocks. Therefore, by utilizing multiple parallel-working arithmetic blocks to execute the computer program, the processor's execution speed can be improved. Furthermore, multi-level conditional statements can be executed in parallel.

[0090] The system (e.g., transformation unit 121) segments (1010) the arithmetic and / or bitwise expressions of the computer program into multiple segments.

[0091] The system (e.g., ABU 130) executes (1020) segments in parallel. Specifically, the ABU 130 can execute multithreaded code. The ABU 130 executes at least two segments in parallel. Specifically, reverse Polish notation can be used to execute segments.

[0092] Figure 11A is an example of a C++ computer program that includes a conditional statement 1101A with an arithmetic body.

[0093] The Boolean condition 1101A of conditional statement 1101A is whether x equals y. The subsequent task 1102 is that z equals 1. The alternative task 1103 is that z equals 0. Conditional statement 1110A can be expressed as follows: If x equals y, then z equals 1. If x does not equal y, then z equals 0. The execution of conditional statement 1110A therefore requires a comparison of variables x and y.

[0094] Figure 11B is an example of a C++ computer program obtained by transforming the computer program in Figure 11A.

[0095] The conditional statement 1110A has been transformed into an arithmetic and / or bitwise expression 1110B that includes only arithmetic and / or bitwise operations. The arithmetic and / or bitwise expression 1101B of the Boolean condition is z = 1 << (xy))%2. Therefore, if x equals y, then z = 1 << (xy))%2 = 1, and if x does not equal y, then z = 1 << (xy))%2 = 0. The execution of the arithmetic and / or bitwise expression 1101B of the conditional statement thus provides the same result as the execution of the conditional statement 1101A but does not require comparison of variables x and y.

[0096] Figure 11C is an example of a combination language computer program 1100C that includes a conditional statement with an arithmetic subject. Figure 11D is an example of a combination language computer program 1100D obtained by transforming the computer program of Figure 11C.

[0097] Figure 12A is an example of a C++ computer program that includes a conditional statement 1201A with a non-arithmic subject.

[0098] The Boolean condition 1201A of condition statement 1201A is whether x equals y. The subsequent task 1201 is to output "equals". The alternative task 1202 is to output "not equals". Condition statement 1210A can be expressed as follows: If x equals y, the program outputs "equals". If x does not equal y, the program outputs "not equals".

[0099] Figure 12B is an example of a C++ computer program obtained by transforming the computer program in Figure 12A.

[0100] Conditional statement 1210A has been transformed into an arithmetic and / or bitwise expression 1210B that includes only arithmetic and / or bitwise operations. The arithmetic and / or bitwise expression of Boolean condition 1201B is res=(1<<k)%2, where k=xy. Therefore, if x=y, then res=(1<<k)%2=1, and if x≠y, then res=(1<<k)%2=0. Unconditional jump 1204 is initialized in initialization statement 1205. Unconditional jump is provided to the label ("condition[res]").

[0101] When the arithmetic and / or bitwise expression of the condition statement is equal to 1 (res=1), the label ("condition[1]") is equal to the start statement ("to_do") of the subsequent task 1201. The unconditional jump statement points to the subsequent task 1201. During execution, when the processor finds the unconditional jump statement 1204, the processor executes the subsequent task 1201.

[0102] When the arithmetic and / or bitwise expression of the conditional statement is equal to 0 (res=0), the label ("condition[0]") is equal to the start statement ("elso_do") of the substitute task 1202. The unconditional jump statement points to the substitute task 1202. During execution, when the processor finds the unconditional jump statement 1204, the processor executes the substitute task 1202.

[0103] The execution of the arithmetic and / or bitwise expression of the conditional statement therefore provides the same result as the execution of the conditional statement.

[0104] Figure 12C is an example of a combination language computer program 1200C that includes conditional statements with arithmetic subjects. Figure 12D is an example of a combination language computer program 1200D obtained by transforming the computer program of Figure 12C.

[0105] Figure 13A shows an example of the combinational logic circuit 1310A of the integrated circuit of the ABU.

[0106] The combinational logic circuit 1310A includes a half-subtractor 1302 for performing two-bit subtraction. The half-subtractor includes a mutex gate 1303, an inverse gate 1304, and an AND gate 1305. The half-subtractor 1302 has two inputs: the minuend A 1311 and the subtrahend B 1312. The half-subtractor 1302 has two outputs: the difference 1313 and the borrow value 1314. The borrow signal 1314 is set when the conditional logic circuit 1310A needs to borrow from the next bit in a multi-bit subtraction. The borrow signal 1314 is equal to 1 only when A equals 0 and B equals 1. Therefore, the borrow signal is equal to 1 when A < B, and equal to 0 when A ≥ B. Thus, the borrow signal provides an evaluation of the Boolean condition A < B.

[0107] Shift operator 1306 shifts the bits equal to 1 to the left by the same number of bits as the difference signal 1313. This results in the base being raised to the power of the result of subtracting B from A. The output of shift operator 1306 is equal to the first right bit of the remainder of the result of dividing the exponent of the base by the remainder of the result of subtracting B from A. Therefore, the output of shift operator 1306 is equal to 1 when A = B, and equal to 0 when A ≠ B. Thus, the output of shift operator 1306 provides an evaluation of the Boolean condition A = B.

[0108] Figure 13B illustrates an example of combinational logic circuit 1310B of the integrated circuit of ABU when variables A and B each consist of only one bit. Conditional logic circuit 1310B includes an inverse OR gate 1320 and an inverse gate 1330. The output of inverse gate 1330 provides the evaluation of the Boolean condition A = B.

[0109] Furthermore, in some implementations, when Boolean conditions are between matrix-type data (arrays, lists, vectors, etc.), the following techniques are used, where elements are represented by numbers and / or characters. Using these techniques can improve the efficiency of comparing matrix-type data, thereby also improving the process of transforming Boolean conditions into arithmetic and / or bitwise expressions of Boolean conditions. Instead of comparing each corresponding number or character (in the same bit) in matrix-type variables A and B, the size of the matrix-type target to be compared (e.g., an array) can be reduced to improve the efficiency of transforming Boolean conditions into arithmetic and / or bitwise expressions of Boolean conditions, as described in conjunction with Figure 14.

[0110] Figure 14 is a flowchart of an example process for reducing the size of, for example, matrix-type data to be compared. This process can be implemented by one or more computer programs installed on one or more computers in one or more locations and programmed according to this specification. For example, the process can be executed by system 100 shown in Figure 1. For convenience, the process will be described as being executed by a system of one or more computers; however, it should be noted that the process in Figure 14 can be part of the preprocessing of a computer program used to perform the transformation, and therefore does not need to be executed on the same computer system executing the transformed computer program. Furthermore, although the process in Figure 14 is described in conjunction with a single variable having matrix-type data (e.g., data objects such as arrays, lists, vectors, etc.), it should be understood that the process is executed for each of the variables to be compared under Boolean conditions (e.g., variable A and variable B).

[0111] The system determines (1400) whether the variable has an odd number of elements. If so, a single element (1405) can be removed from the variable before splitting (1410) the variable during subsequent processing, and that single element is added to the smaller version of the resulting variable. For example, a new matrix-type variable can be instantiated for the smaller version of the variable, and the data value of an element (e.g., the last element) of the input variable can be added to the new variable (e.g., in the first element of the new variable), and that element can then be removed from the initial variable, resulting in an even number of elements for splitting (1410). Note that the same single element (1405) (in terms of position, e.g., in the array) should be removed from each corresponding variable to be compared (to add to the smaller version of the variable). Furthermore, some implementations process the variable in the appropriate place without involving the instantiation of a new version of the variable; therefore, references to the following variables include implementations that instantiate new variables and implementations that do not instantiate new variables. Finally, note that multidimensional arrays can be processed by recursively performing the same process described herein.

[0112] The variable is split (1410) into pairs of elements, where the data value in each pair is used to form the data value of the smaller variable. For example, the first pair of elements could be the first and second elements of the input variable, the second pair of elements could be the third and fourth elements of the input variable, the third pair of elements could be the fifth and sixth elements of the input variable, and so on. Alternatively, pairs of elements can be formed in other suitable ways (where each element of the variable is part of only one pair). It should be noted that for each set of comparison variables, for example, for all comparison variables of a given type, they should be split (1410) into pairs in the same way. Typically, the smaller version of each variable to be compared by the Boolean condition is formed using representative numbers from a mathematical sequence, where the differences between members of the mathematical sequence increase, where each representative number is a number representing a pair of numbers or characters in the pair of elements, and when the input variable has an odd number of data elements, the smaller version of each variable will also include a single element from the input variable (e.g., the last data element). Furthermore, in some implementations, all optimization steps are performed exactly the same for each comparison (matrix type) variable.

[0113] To represent a pair of numbers or characters as a single number, the property of difference-increasing order between the members of these sequences can be utilized, i.e., the sum of the two members of a difference-increasing mathematical sequence (geometric sequence, etc.) is unique. Therefore, for each pair of elements in a pair of bi-elements of the variable, the corresponding members of the mathematical sequence are summed (1415), where the members of the mathematical sequence correspond to a pair of elements in the pair of elements of the variable, and each data value in that pair is used as the position index of the corresponding member in the mathematical sequence. This can be understood as replacing each element in the pair with a member of the mathematical sequence such that its index in the mathematical sequence equals the data value of the element in the pair, and then summing the two members of the mathematical sequence for each pair of elements in the pair of elements of the variable to form each corresponding representative number in the smaller (reduced-size) variable. Note that the same (selected) mathematical sequence is applied to derive the representative number (1415) of the comparison (matrix type) variable; in some implementations, the same mathematical sequence is applied to all comparison (matrix type) variables (when deriving the representative number).

[0114] The system can also determine whether the position of an element in a variable (1420) is important. For example, when dealing with sorted arrays, position is not important (because the position of the elements in the sorted array is known), and when dealing with logical conditions, position is not important, where [2,3] is considered equal to [3,2]. In other cases, such as when [2,3] is considered not equal to [3,2], position is important. If position is not important, each representative number in the sum of the number of members of the mathematical sequence can be used as is. However, if the position of an element in a variable is important, the position variable (1425) is calculated for the pairs of elements in the two-element pairs of the variable. Calculating the position variable for each pair of elements in (1425) may involve raising the result of the Boolean condition Y > X to the power of -1, where X is the first element in the pair and Y is the second element in the pair. Therefore, if Y > X, the position variable is -1, and if Y ≤ X, the position variable is +1. In addition, note that in some implementations, the anti-Boolean condition can also be used.

[0115] For comparison variables where the position of an element is important, a representative number is further formed by multiplying the sum of each member of the mathematical sequence with the position variable of the corresponding element pair in the bi-element pair of the variable (1430). Therefore, F(n) is used as a function of the number determined by the index in the selected mathematical sequence (the difference between the members of the sequence increases), where x can be the first number, y can be the second number, and z can be the unique number (representative number) formed therefrom. The formula for an element whose position in the pair is important is: The formula for an element whose position in the pair is not important is: Z = F(x) + F(y) Note that these sequences where the difference between the members of the mathematical sequence increases are sequences where |a(i+1) - a(i)| > |a(i) – a(i-1)|, such as geometric sequences, exponential sequences, etc. Here, an is a member of the sequence whose index (position) is equal to n. Furthermore, the Fibonacci sequence receives this property starting from the third member of the series.

[0116] In addition, the number of representatives (1435) is stored in a smaller (reduced-size) version of the variables for use in evaluating the Bollinger condition between the original variables A and B, or for further reducing the size of the variables before evaluating the Bollinger condition between the original variables A and B. For example, the number of representatives for each new pair can be added to a new array, which is a smaller (reduced-size) version of the previous array. Note that the number of representatives should be stored (1435) in the smaller version of the variables, and that for all comparison variables, any individual element (1405) should be removed from the initial variables in the same order.

[0117] The system can decide (1440) whether the variable needs further size reduction. For example, given (1) the time spent performing additional size reduction (the more elements in the variable and the more variables being compared, the greater the time advantage compared to a normal comparison) and / or (2) the amount of memory consumed (due to the rapid growth of the series, the values ​​of the elements in the reduced variable will grow without supporting long arithmetic, and in order to save memory, the system may round the values ​​of the elements, which may lead to conflicts between very large or very small numbers) compared to a traditional comparison (of each corresponding number or character in the same position in matrix-type variables A and B), if performing this operation does not improve efficiency, then further reduction is not required. Therefore, if further reduction is not required, the process in Figure 14 ends. If further reduction is required, the process in Figure 14 is repeated to reduce the size of the variable again.

[0118] Please note that the procedure in Figure 14 is performed for variables A and B (which have matrix-type data) to be compared under Boolean conditions. The data values ​​of the elements of the variables whose size is reduced using the procedure in Figure 14 can be numbers and / or characters, and the result of reducing the size of variables A and B is to improve the efficiency of transforming Boolean conditions into arithmetic and / or bitwise expressions of Boolean conditions.

[0119] Furthermore, as mentioned above, when processing sorted arrays, the position of an element within the matrix-type variables to be compared is not important. Therefore, in some implementations, each matrix-type variable (array, list, vector, etc.) to be compared is sorted to avoid one or more parts (or all) of the decision (1420), calculation (1425), and multiplication (1430) operations. Combining the transformation of the Boolean condition into an arithmetic and / or bitwise expression of the Boolean condition, the following sorting techniques can provide improved efficiency. For example, instead of sorting the entire array on a single thread using modern sorting techniques (e.g., quicksort or qsort, bubble sort, selection sort, insertion sort, etc.), the array can be split into multiple smaller subarrays, the number of which corresponds to the number of available threads, where the processing of each smaller subarray can be performed in parallel by a separate thread, and where the (search) position index of each element in the original array is determined by comparing the value of each element with the other elements of the initial array.

[0120] Figure 15 is a flowchart of an example process for parallel sorting of matrix-type data, such as matrix-type data to be compared, which can be combined with arithmetic and / or bitwise expressions for transforming Boolean conditions into Boolean conditions. This process can be implemented by one or more computer programs installed on one or more computers in one or more locations and programmed according to this specification. For example, the process can be executed by system 100 shown in Figure 1. For convenience, the process will be described as being executed by a system of one or more computers; however, it should be noted that the process in Figure 15 can be part of the preprocessing of the computer program used to perform the transformation, and therefore does not need to be executed on the same computer system that executes the transformed computer program. In any case, this parallel sorting scheme can improve the overall computational efficiency of the processing operation.

[0121] Based on the initial (selected for sorting) matrix-type data variable, the system can instantiate (1500) new variables with the same number of elements as the matrix-type data variable. For example, a new array with the same number of elements as the initial (unsorted) array can be created, and all positions in the new array can be filled with null values. The system allocates the necessary memory capacity to store the new variables.

[0122] The system divides a matrix-type data variable into multiple sub-parts (1505), the number of which equals the number of processing threads to be used for sorting. For example, the initial (unsorted) array can be split into multiple subarrays, the number of which equals the number of threads allocated to the sorting task. Note that the sub-parts of a matrix-type data variable do not need to be equal in dimensions.

[0123] Each of the processing threads in the system determines (1510) the position index of each element in the sub-part handled by that processing thread. This may involve comparing the value of each element in the sub-part with all other values ​​in the matrix-type data variable, and counting how many elements of the matrix-type data variable are less than (or greater than) the comparison elements in the sub-part. For example, at the level of each thread, the system may determine the position index of each element in each sub-array of the sorted array by comparing the value of each element in the sub-array with the values ​​of the remaining elements in the initial array and counting the number of elements in the initial array whose values ​​are greater than (or less than) the comparison elements.

[0124] When the count value is less than the number of elements being compared, the result count is the position index. That is, a count of zero indicates that no other value in the matrix-type data variable is less than the comparison value in the variable's sub-part, so this comparison value is ranked first in the sorting variable (when sorted in ascending order). In contrast, when the count value is greater than the number of elements being compared, the result count is the reciprocal position index. That is, a count of zero indicates that no other value in the matrix-type data variable is greater than the comparison value in the variable's sub-part, so this comparison value is ranked last in the sorting variable (when sorted in ascending order).

[0125] In some implementations, the system determines (1515) whether the sorting is in ascending or descending order. In other implementations, the sorting is always performed in one or the other order, so the system does not need to determine (1515).

[0126] When sorting in ascending order, the system replaces (1520) the values ​​in the new variable with the values ​​from the matrix-type data variables in ascending order based on the position indices determined by the processing thread. Therefore, for regular position indices (when the count is small), the value in the matrix-type data variable with position index zero is in the first position of the new variable, the value in the matrix-type data variable with position index one is in the second position, the value in the matrix-type data variable with position index two is in the third position, and so on. For example, by replacing null values ​​in the new array with corresponding values ​​in the initial array with the same position indices in ascending order, the position index counts at the subarray level in the initial array can be merged into the new array.

[0127] Then, the system checks (1525) to see if any values ​​remain unchanged in the new variable. For example, since there are elements with equal values ​​in the initial array, the system can check if there are still null elements in the new array. At this stage, if there are no null elements in the new array, the new array can be considered an equivalent of the sorted (initial) array. Note that each element in the initial variable whose value is equal to the value of another element in the initial variable will receive the same position index as that other element; therefore, when there are equal values ​​in the initial variable, one or more elements in the new variable will remain unchanged after substitution (1520).

[0128] When this occurs, the system replaces (1530) any unchanged values ​​in the new variable with the left-adjacent element value in the new variable. For example, all remaining elements in the new array with null values ​​can be replaced with the first (non-null) value element to the left of the null element, after which the new array can be considered an equivalent of the sorted (initial) array. Given the number of equal values ​​in the elements of the initial matrix-type data variable, multiple replacements will be performed as needed.

[0129] Similarly, when sorting in descending order, the system replaces the values ​​in the new variable (1535) with values ​​from the matrix-type data variables in descending order based on the position indices determined by the processing thread. Therefore, for the reciprocal position indices (when the count is larger), the value in the matrix-type data variable with position index zero is in the first position of the new variable, the value in the matrix-type data variable with position index one is in the second position, the value in the matrix-type data variable with position index two is in the third position, and so on. For example, by replacing null values ​​in the new array with corresponding values ​​in the initial array with the same position indices in descending order, the position index counts at the subarray level in the initial array can be merged into the new array.

[0130] Then, the system checks (1540) to see if any values ​​remain unchanged in the new variable. For example, since there are elements with equal values ​​in the initial array, the system can check if there are still null elements in the new array. At this stage, if there are no null elements in the new array, the new array can be considered an equivalent of the sorted (initial) array. Note that each element in the initial variable whose value is equal to the value of another element in the initial variable will get the same position index as that other element, so when there are equal values ​​in the initial variable, one or more elements in the new variable will remain unchanged after substitution (1535).

[0131] When this occurs, the system replaces (1545) any unchanged values ​​in the new variable with the right-hand adjacent element value in the new variable. For example, all remaining elements in the new array with null values ​​can be replaced with the first (non-null) value element to the right of the null element, after which the new array can be considered an equivalent of the sorted (initial) array. Given the number of equal values ​​in the elements of the initial matrix-type data variable, this will be done multiple times as needed.

[0132] Finally, the system uses the new variable (1550) as the sorted version of the matrix-type data variable. In some cases, this is achieved by using the new variable instead of the initial matrix-type data variable during the process of Figure 14. In some cases, this is achieved by overwriting the values ​​in the initial matrix-type data variable with the sorted values ​​in the new variable, and using the currently sorted matrix-type data variable during the process of Figure 14.

[0133] Furthermore, it should be noted that the parallel sorting process in Figure 15 can be effectively used in contexts other than the matrix optimization process (for comparing matrix-type data) in Figure 14. For example, the parallel sorting process in Figure 15 can also be used in the context of efficient sorting of matrix-type data (without further matrix optimization and comparison) to optimize standard sorting for a wide variety of tasks, as described in this application, using methods such as transforming Boolean conditions into arithmetic and / or bitwise expressions of Boolean conditions.

[0134] In some implementations, the method for sorting a matrix-type data target may include: instantiating a new target with the same number of elements as the matrix-type data target; dividing the matrix-type data target into multiple sub-parts, the number of which is equal to the number of processing threads to be used for sorting; each of the respective processing threads determining the position index of each element in the sub-part to be handled by the processing thread by comparing the value of each element in the sub-part with all other values ​​in the matrix-type data target and counting how many elements of the matrix-type data target are less than or greater than the comparison elements of the sub-part for the reciprocal position index; replacing the values ​​in the new target with the values ​​from the matrix-type data target in ascending or descending order according to the position index determined by the processing thread; and replacing any unchanged values ​​in the new target with the left or right adjacent element values ​​in the new target, depending on whether the sorting is ascending or descending, wherein the new target serves as a sorted version of the matrix-type data target. Please note that determining the position index by comparison value can employ the systems and techniques described in Figures 1 through 13 to transform the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition, which leads to improved efficiency in processing operations.

[0135] Furthermore, it should be noted that the optimization process for comparing matrix-type data (or targets) in Figure 14 can be effectively used in contexts other than transforming Boolean conditions into arithmetic and / or bitwise expressions of Boolean conditions. For example, this matrix variable optimization process can also be used in the context of comparisons without converting Boolean conditions into arithmetic and / or bitwise expressions, such as for comparisons based on optimization criteria. Moreover, the optimization process in Figure 14 can be used independently of the comparison process. For example, the optimization process in Figure 14 can be used to compress matrices into smaller matrices for efficient storage (requiring less memory).

[0136] In some implementations, the matrix variable optimization process in Figure 14 is used to more generally improve the efficiency of matrix-type target comparisons. Therefore, the method (according to some embodiments) may include: accessing a computer program including a conditional statement comprising a Boolean condition for comparing a first variable A and a second variable B, wherein each of the first variable A and the second variable B includes matrix-type data; splitting each of the first variable A and the second variable B into a first pair of binary pairs of the first variable A and a second pair of binary pairs of the second variable B; and forming smaller versions of each of the first variable A and the second variable B for comparison using representative numbers from a mathematical sequence, wherein the differences between members of the mathematical sequence increase, and wherein the representative numbers used for the smaller version of the first variable A... Each of the following is calculated based on the members of a mathematical sequence, where the index in the mathematical sequence equals the data value in the first pair of pairs of the first variable A. Each of the representative numbers for the smaller version of the second variable B is calculated based on the members of a mathematical sequence, where the index in the mathematical sequence equals the data value in the second pair of pairs of the second variable B. Furthermore, when each of the first variable A and the second variable B has an odd number of elements, a single element is removed from the first variable A and the second variable B before splitting, and a single element from the first variable A and the second variable B is added to the smaller version of the first variable A and the second variable B, respectively. Additionally, the method includes comparing the smaller versions of the first variable A and the second variable B while running a computer program to evaluate the Boolean condition described in the condition description.

[0137] In some embodiments, the formation operation of the above method includes: calculating a representative number for the smaller version of the first variable A by summing two corresponding members of the mathematical sequence corresponding to the data value in the first double-element pair of the first variable A for each element of the smaller version of the first variable A; and calculating a representative number for the smaller version of the second variable B by summing two corresponding members of the mathematical sequence corresponding to the data value in the second double-element pair of the second variable B for each element of the smaller version of the second variable B.

[0138] In some embodiments, the above method includes: calculating a first positional variable of a first pair of binary elements of a first variable A; calculating a second positional variable of a second pair of binary elements of a second variable B; wherein calculating each positional variable of a pair of elements includes raising the result of the Boolean condition Y > X to the power of a number equal to negative 1, where X is the first element of the pair of elements and Y is the second element of the pair of elements; and wherein the formation includes: multiplying one of the first positional variables for each element of the smaller version of the first variable A by the sum of two members of the corresponding mathematical sequence corresponding to the data value in the first pair of binary elements of the first variable A, to calculate the representative number of the smaller version of the first variable A, and multiplying one of the second positional variables for each element of the smaller version of the second variable B by the sum of two members of the corresponding mathematical sequence corresponding to the data value in the second pair of binary elements of the second variable B, to calculate the representative number of the smaller version of the second variable B.

[0139] In some implementations, the same steps, order, and tools (e.g., mathematical series sequences) are applied to all comparison (matrix type) variables. Furthermore, one or more systems described in this document can be used in one or more embodiments, wherein one or more memory units are used to cause one or more instruction processing units to perform the operations of the methods described above. These systems and methods for matrix type target comparisons improve processing speed because matrix type data can be compared as quickly as possible on a given computer (with a given processing power) than previously possible on that particular computer. Furthermore, these systems and methods for matrix type target comparisons can reduce memory consumption because smaller versions of the variables may require less memory than the initial variables.

[0140] Some embodiments include a method comprising: accessing a computer program, wherein the computer program includes a conditional description, the conditional description including a Boolean condition; transforming the Boolean condition into an arithmetic and / or bitwise expression of the Boolean condition; generating an arithmetic and / or bitwise expression of the computer program, including an arithmetic and / or bitwise expression of the Boolean condition replacing the Boolean condition; and providing the arithmetic and / or bitwise expression of the computer program for execution by an arithmetic and / or bitwise arithmetic unit of a processor. The arithmetic and / or bitwise expression of the Boolean condition can verify the following: if the Boolean condition is verified, the arithmetic and / or bitwise expression of the Boolean condition equals 1; if the Boolean condition is not verified, the arithmetic and / or bitwise expression of the Boolean condition equals 0.

[0141] In some embodiments of the above method, the Bollinger condition uses a first variable A and a second variable B, and transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition includes: subtracting B from A; calculating the absolute value of the result of subtracting B from A; calculating the exponent based on the absolute value of the result of subtracting B from A; calculating the exponent by raising the calculated exponent to the power of the base; and calculating the arithmetic and / or bitwise expression of the Bollinger condition based on the remainder when the exponent is divided by the base. The Bollinger condition can be A = B, and transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition may include: calculating the exponent as the absolute value of the result of subtracting B from A; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as the remainder when the exponent is divided by the base.

[0142] The Bollinger condition can be A ≥ B, and transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition can include: subtracting the absolute value of the result of subtracting B from A from the result of subtracting B from A; calculating the exponent as the absolute value of the result of subtracting B from the result of subtracting B from A; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as the remainder of the exponent divided by the base.

[0143] The Bollinger condition can be A < B, and transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition can include: subtracting the absolute value of the result of A minus B from ...

[0144] The first variable A and the second variable B can be floating-point type data. In some embodiments, the Bollinger condition is A = B, the first variable A and the second variable B are floating-point type data, and transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition includes: calculating the result of applying the exponent as the absolute value of the result of A minus B; and calculating the remainder of the arithmetic and / or bitwise expression of the Bollinger condition by dividing the exponent by the base. In some embodiments, the Bollinger condition is A ≥ B, the first variable A and the second variable B are floating-point type data, and transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition includes: subtracting the result of A minus B from the absolute value of the result of A minus B; calculating the result of applying the exponent as the absolute value of the result of A minus B from the absolute value of the result of A minus B; and calculating the remainder of the arithmetic and / or bitwise expression of the Bollinger condition by dividing the exponent by the base. In some embodiments, the Bollinger condition is A < B, the first variable A and the second variable B are floating-point type data, and transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition includes: subtracting the absolute value of the result of subtracting B from A from the result of A; calculating the exponent as the top function applied to the result of: subtracting the absolute value of the result of subtracting B from the result of A from the result of B from the result of A; calculating the exponent by multiplying the base by the exponent; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as 1 minus the remainder of the exponent divided by the base.

[0145] In some embodiments, the first variable A and the second variable B can be Boolean type data (0 and 1), the Boolean condition can be A = B, and transforming the Boolean condition into an arithmetic and / or bitwise expression of the Boolean condition can include: calculating the sum of A and B; and calculating the arithmetic and / or bitwise expression of the Boolean condition as 1 minus the remainder of the sum divided by the base.

[0146] In some embodiments, the first variable A and the second variable B may include matrix-type data, and the method may include: splitting each of the first variable A and the second variable B into a first pair of pairs of the first variable A and a second pair of pairs of the second variable B; and forming smaller versions of each of the first variable A and the second variable B for comparison using representative numbers from a mathematical sequence, wherein the differences between members of the mathematical sequence increase; wherein each of the representative numbers for the smaller version of the first variable A is calculated based on the members of the mathematical sequence, the index of which is equal to the data value in the first pair of pairs of the first variable A; wherein each of the representative numbers for the smaller version of the second variable B is calculated based on the members of the mathematical sequence, the index of which is equal to the data value in the second pair of pairs of the second variable B; and wherein when each of the first variable A and the second variable B has an odd number of elements, a single element is removed from the first variable A and the second variable B before splitting, and a single element from the first variable A and the second variable B is added to the smaller versions of the first variable A and the second variable B, respectively.

[0147] The formation may include: calculating the representative number for the smaller version of the first variable A by summing two corresponding members of the mathematical sequence corresponding to the data value in the first double-element pair of the first variable A for each element of the smaller version of the first variable A; and calculating the representative number for the smaller version of the second variable B by summing two corresponding members of the mathematical sequence corresponding to the data value in the second double-element pair of the second variable B for each element of the smaller version of the second variable B.

[0148] The above method may also include: sorting each of the first variable A and the second variable B, wherein the sorting of the matrix-type data variable includes: instantiating a new variable having the same number of elements as the matrix-type data variable; dividing the matrix-type data variable into multiple sub-parts, the number of which is equal to the number of processing threads to be used for sorting; each of the corresponding processing threads determining the position index of each element in the sub-part to be handled by the processing thread by comparing the value of each element of the sub-part with all other values ​​in the matrix-type data variable and counting how many elements of the matrix-type data variable are less than or greater than the comparison elements of the sub-part for the reciprocal position index; replacing the value in the new variable with the value from the matrix-type data variable in ascending or descending order according to the position index determined by the processing thread; and replacing any unchanged value in the new variable with the left adjacent element value or right adjacent element value in the new variable, depending on whether the sorting is ascending or descending, wherein the new variable serves as the sorted version of the matrix-type data variable.

[0149] The above method may also include: calculating the first positional variable of the first pair of binary elements of the first variable A; calculating the second positional variable of the second pair of binary elements of the second variable B; wherein calculating each positional variable of a pair of elements includes exponentiation of the result of the Boolean condition Y > X on the number equal to negative 1, where X is the first element of the pair of elements and Y is the second element of the pair of elements; and wherein the formation includes: multiplying one of the first positional variables for each element of the smaller version of the first variable A by the sum of two members of the corresponding mathematical sequence corresponding to the data value in the first pair of binary elements of the first variable A, to calculate the representative number of the smaller version of the first variable A, and multiplying one of the second positional variables for each element of the smaller version of the second variable B by the sum of two members of the corresponding mathematical sequence corresponding to the data value in the second pair of binary elements of the second variable B, to calculate the representative number of the smaller version of the second variable B.

[0150] In the above embodiment, the base can be equal to 2, wherein the processor uses a binary system, and wherein the last bit of the exponent is taken to extract the square root of the remainder when the exponent is divided by the base. Furthermore, when the processor uses a binary system, the power of the base using the calculated exponent can be performed by shifting the bits equal to 1 to the left by the number of bits of the calculated exponent.

[0151] The Bolling condition can be A < B, and transforming the Bolling condition into an arithmetic and / or bitwise expression of the Bolling condition can include: A minus B; calculating the borrow value of the result of A minus B in the arithmetic and / or bitwise expression of the Bolling condition.

[0152] Providing arithmetic and / or bitwise expressions for a computer program may include: segmenting the arithmetic and / or bitwise expressions of the computer program into multiple segments of arithmetic and / or bitwise expressions; and the segments of arithmetic and / or bitwise expressions may be used to execute in parallel.

[0153] The Boolean condition may include a subsequent task expressed as an arithmetic statement, and the arithmetic and / or bitwise expression that generates the computer program may include multiplying the subsequent task by the arithmetic and / or bitwise expression of the Boolean condition. The Boolean condition may include an alternative task expressed as an arithmetic statement, and the arithmetic and / or bitwise expression that generates the computer program may include multiplying the alternative task by 1 minus the arithmetic and / or bitwise expression of the Boolean condition.

[0154] The Boolean condition may include a subsequent task expressed as a non-arithmic statement using a formula, and the arithmetic and / or bitwise expression generating the computer program may include an unconditional jump to a label associated with the arithmetic and / or bitwise expression of the Boolean condition within the arithmetic and / or bitwise expression of the computer program. Furthermore, when the value of the arithmetic and / or bitwise expression of the Boolean condition is equal to 1, the label may be equal to the start of the statement of the subsequent task. Additionally, the Boolean condition may include an alternative task expressed as a non-arithmic statement using a formula, wherein when the value of the arithmetic and / or bitwise expression of the Boolean condition is equal to 0, the label is equal to the start of the statement of the alternative task.

[0155] In some embodiments, the method further includes: executing an arithmetic and / or bitwise expression of a computer program by an arithmetic and / or bitwise operation unit. In some embodiments, at least the transformation is performed by a first computer, and the execution is performed by a second computer. In some embodiments, the transformation and execution are performed by the same computer.

[0156] Some embodiments include a system comprising: one or more instruction processing units, including at least one control unit, at least one arithmetic and / or bitwise operation unit, and at least one register unit; and one or more memory units coupled to the one or more instruction processing units; wherein the system is configured to execute, in a computer program, substantially all conditional statements including Boolean conditions by using at least one arithmetic and / or bitwise operation unit to execute arithmetic and / or bitwise expressions of substantially all conditional statements. In such system embodiments, at least one control unit or separate data processing device of the system may be used to perform the method operations of any of the above method embodiments, and at least one arithmetic and / or bitwise operation unit of the processor may include one or more instruction processing units for executing arithmetic and / or bitwise expressions of the computer program. Furthermore, at least one arithmetic and / or bitwise operation unit may include one or more of an arithmetic block, a bitwise shift block, and a bitwise logic block, and at least one arithmetic and / or bitwise operation unit need not include any bit comparator.

[0157] Embodiments of the subject matter and functional operation described in this specification may be implemented in digital electronic circuits, tangibly embodied computer software or firmware, computer hardware (including the structures disclosed in this specification and their structural equivalents), or a combination thereof. Embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory storage medium for execution or control of operation by a data processing device. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination thereof. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals (e.g., machine-generated electrical, optical, or electromagnetic signals) generated for encoding information to be transmitted to a suitable receiver device for execution by the data processing device.

[0158] The term "data processing device" refers to data processing hardware and includes various devices, apparatuses, and machines for processing data, such as programmable processors, computers, or multiple processors or computers. The device may also be or further include special-purpose logic circuitry, such as FPGAs (Field Programmable Gate Arrays) or ASICs (Application Specific Integrated Circuits). In addition to hardware, the device may, where appropriate, include code that creates an execution environment for computer programs, such as code constituting processor firmware, protocol stacks, database management systems, operating systems, or combinations thereof.

[0159] A computer program (also referred to or described as a program, software, software application, application, module, software module, script, or code) may be written in any form of programming language, including compiled or interpreted languages, or declarative or programming languages, and may be deployed in any form, including as a standalone program or as a module, component, subprogram, or other unit suitable for use in a computing environment. A program may, but does not necessarily, correspond to a file in a file system. A program may be stored in a file that holds other programs or data, for example, in a markup language document, in a single file dedicated to said program, or in one or more scripts stored in multiple coordination files, for example, in a file that stores one or more modules, subprograms, or portions of code. A computer program may be deployed to execute on a single computer or on multiple computers located at a site or distributed across multiple sites and interconnected by a data communication network.

[0160] Using a system of one or more computers to perform a specific operation or action means that software, firmware, hardware, or a combination thereof are installed on the system, which, when running, causes the system to perform the operation or action. Using one or more computer programs to perform a specific operation or action means that one or more programs include instructions that, when executed by a data processing device, cause that device to perform the operation or action.

[0161] As used in this specification, "engine" or "software engine" refers to a software-implemented input / output system that provides outputs equivalent to inputs. An engine can be a coded functional block, such as a library, platform, software development kit ("SDK"), or target. Each engine can be implemented on any suitable type of computing device, such as a server, mobile phone, tablet computer, laptop computer, music player, e-book reader, desktop or laptop computer, PDA, smartphone, or other fixed or portable device, including one or more processors and computer-readable media. Furthermore, two or more engines can be implemented on the same computing device or on different computing devices.

[0162] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by manipulating input data and generating output. The processes and logic flows can also be performed by dedicated logic circuits (such as FPGAs or ASICs) or by a combination of dedicated logic circuits and one or more programming computers.

[0163] A computer suitable for executing computer programs can be based on a general-purpose microprocessor or a special-purpose microprocessor or both, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory or random access memory or both. The basic components of a computer are the central processing unit for making or executing instructions and one or more memory devices for storing instructions and data. The central processing unit and memory may be supplemented by or incorporated into special-purpose logic circuitry. Typically, a computer will also include or be operatively coupled to one or more mass storage devices (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data, for receiving data from or for transferring data to such storage devices, or both. However, a computer need not have such a device. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device, such as a universal serial bus (USB) flash drive, etc.

[0164] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, such as semiconductor memory devices, such as EPROM, EEPROM and flash memory devices; magnetic disks, such as internal hard disks or removable magnetic disks; magneto-optical disks; and CD ROM and DVD-ROM magnetic disks.

[0165] To provide interaction with the user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) and a keyboard and pointing device (e.g., a mouse, trackball, or presence-sensitive display or other surface by which the user can provide input to the computer). Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including sound input, voice input, or tactile input. Furthermore, the computer can interact with the user by sending and receiving documents to and from the device used by the user; for example, by sending a webpage to a web browser on the user's device in response to a request received from a web browser. Additionally, the computer can interact with the user in return by sending text messages or other forms of messages to a personal device (e.g., a smartphone), running a messaging application, and receiving response messages from the user.

[0166] Embodiments of the subject matter described in this specification can be implemented in a computing system that includes back-end components (e.g., as a data server), or middleware components (e.g., an application server), or front-end components (e.g., a client computer having a graphical user interface, a web browser, or an application through which a user can interact with an implementation of the subject matter described in this specification), or any combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected via any form or medium of digital data communication, such as a communication network. Examples of communication networks include local area networks (LANs) and wide area networks (WANs), such as the Internet.

[0167] A computing system may include clients and servers. Clients and servers are typically geographically separated and typically interact via a communication network. The client-server relationship arises because computer programs run on their respective computers and have a client-server relationship with each other. In some embodiments, for example, for the purpose of displaying data to a user interacting with a device as a client and receiving user input from that user, the server transmits data (e.g., HTML pages) to the user device. Data generated at the user device (e.g., the result of user interaction) may be received at the server from the device.

[0168] Although this specification contains numerous specific implementation details, these details should not be construed as limiting the scope of any invention or the scope that may be claimed, but rather as descriptions of features that may be specific to particular embodiments of a particular invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually in multiple embodiments or in any suitable sub-combination. Furthermore, although the foregoing features may be described as functioning in certain combinations, or even initially claimed in this manner, in some cases one or more features from the claimed combination may be removed from the combination, and the claimed combination may involve sub-combinations or variations thereof.

[0169] Similarly, although operations are depicted in a specific order in the figures, this should not be construed as requiring such operations to be performed in the specific order shown or in sequential order, or requiring all shown operations to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated into a single software product or packaged into multiple software products.

[0170] Specific embodiments of the subject matter have been described. Other embodiments fall within the scope of the following claims. For example, the actions listed in the claims can be performed in a different order and still achieve the desired result. As an example, the processes depicted in the drawings do not necessarily require the specific order or sequence shown to achieve the desired result. For example, operations 1420 and 1425 do not necessarily follow operation 1415 in Figure 14; in some implementations, operations 1420 and 1425 are performed before operation 1415. Furthermore, in some cases, multitasking and parallel processing may be advantageous. [Simplified Explanation of the Diagram]

[0011] Figure 1 is a diagram showing the example system.

[0012] Figure 2 is a flowchart of an example process of executing a computer program using only the processor's arithmetic and / or bitwise units.

[0013] Figure 3 is pseudocode showing the basic structure of the if-then(-else) conditional statement.

[0014] Figure 4 is a flowchart of an example process of transforming Boolean conditions into arithmetic and / or bitwise expressions.

[0015] Figure 5 is a flowchart of an example process of transforming A = B into an arithmetic and / or bitwise expression of A = B.

[0016] Figure 6 is a flowchart of an example process of transforming A ≥ B into an arithmetic and / or bitwise expression of A ≥ B.

[0017] Figures 7A and 7B are flowcharts of an example process of transforming A < B into an arithmetic and / or bitwise expression of A < B.

[0018] Figure 8 is a flowchart of an instance process for generating an arithmetic and / or bitwise expression of a computer program when the conditional statement has an arithmetic body.

[0019] Figure 9 is a flowchart of an instance process for generating an arithmetic and / or bitwise expression of a computer program when the conditional statement has a non-arithmetic subject.

[0020] Figure 10 is a flowchart of an example process for providing arithmetic and / or bitwise expressions in a computer program.

[0021] Figure 11A is an example of a C++ computer program including conditional statements with arithmetic bodies. Figure 11B is an example of a C++ computer program obtained by transforming the computer program in Figure 11A. Figure 11C is an example of a combination language computer program including conditional statements with arithmetic bodies. Figure 11D is an example of a combination language computer program obtained by transforming the computer program in Figure 11C.

[0022] Figure 12A is an example of a C++ computer program including conditional statements with non-arithmic bodies. Figure 12B is an example of a C++ computer program obtained by transforming the computer program in Figure 12A. Figure 12C is an example of a combination language computer program including conditional statements with arithmetic bodies. Figure 12D is an example of a combination language computer program obtained by transforming the computer program in Figure 12C.

[0023] Figures 13A and 13B show examples of combinational logic circuits of integrated circuits of arithmetic and / or bitwise operation units.

[0024] Figure 14 is a flowchart of an example process for reducing the size of matrix-type data.

[0025] Figure 15 is a flowchart of an example process of parallel sorting of matrix-type data.

Claims

1. A method comprising the steps of: accessing a computer program, wherein the computer program includes a conditional description, the conditional description including a Boolean condition; transforming the Boolean condition into an arithmetic and / or bitwise expression of the Boolean condition; generating an arithmetic and / or bitwise expression of the computer program, including the arithmetic and / or bitwise expression of the Boolean condition replacing the Boolean condition; and providing the arithmetic and / or bitwise expression of the computer program, wherein the arithmetic and / or bitwise expression of the computer program is for execution by an arithmetic and / or bitwise arithmetic unit of a processor.

2. The method as described in claim 1, wherein the arithmetic and / or bitwise expression of the Bolin condition verifies the following: if the Bolin condition is verified, the arithmetic and / or bitwise expression of the Bolin condition is equal to 1; and if the Bolin condition is not verified, the arithmetic and / or bitwise expression of the Bolin condition is equal to 0.

3. The method as described in claim 1, wherein the Bollinger condition employs a first variable A and a second variable B, wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition comprises the following steps: subtracting B from A; calculating an absolute value of the result of subtracting B from A; calculating an exponent based on the absolute value of the result of subtracting B from A; calculating an exponent by raising the calculated exponent to a base; and calculating the arithmetic and / or bitwise expression of the Bollinger condition based on a remainder when the exponent is divided by the base.

4. The method as described in claim 3, wherein the Bollinger condition is A = B, and wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition comprises the following steps: calculating the absolute value of the result of A minus B as the exponent; and calculating the remainder of the arithmetic and / or bitwise expression of the Bollinger condition as the exponent divided by the base.

5. The method as described in claim 3, wherein the Bollinger condition is A ≥ B, and wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition comprises the following steps: subtracting the result of A minus B from the absolute value of the result of A minus B; calculating the exponent as the absolute value of the result of A minus B from the absolute value of the result of A minus B; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as the remainder of the exponent divided by the base.

6. The method as described in claim 3, wherein the Bollinger condition is A < B, and wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition comprises the following steps: subtracting the result of A minus B from the absolute value of the result of A minus B; calculating the exponent as the absolute value of the result of A minus B from the absolute value of the result of A minus B; calculating the exponent by exponentifying the base; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as 1 minus the remainder of the exponent divided by the base.

7. The method as described in claim 3, wherein the Bollinger condition is A = B, wherein the first variable A and the second variable B are floating-point type data, and wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition includes the following steps: calculating the exponent as a result of applying a top function to the absolute value of the result of subtracting B from A; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as the remainder of the exponent divided by the base.

8. The method as described in claim 3, wherein the Bollinger condition is A ≥ B, wherein the first variable A and the second variable B are floating-point type data, and wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition includes the following steps: subtracting the result of A minus B from the absolute value of the result of A minus B; calculating the exponent as a top function applied to a result of: subtracting the absolute value of the result of A minus B from the absolute value of the result of A minus B from the absolute value of the result of A minus B; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as the remainder of the exponent divided by the base.

9. The method as described in claim 3, wherein the Bollinger condition is A < B, wherein the first variable A and the second variable B are floating-point type data, and wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition includes the following steps: subtracting the result of A minus B from the absolute value of the result of A minus B; calculating the exponent as a top function applied to a result of: subtracting the absolute value of the result of A minus B from the absolute value of the result of A minus B from the absolute value of the result of A minus B; calculating the exponent by exponentifying the base; and calculating the arithmetic and / or bitwise expression of the Bollinger condition as 1 minus the remainder of the exponent divided by the base.

10. The method as described in claim 3, wherein the first variable A and the second variable B are Boolean type data, wherein the Boolean condition is A = B, and wherein the step of transforming the Boolean condition into an arithmetic and / or bitwise expression of the Boolean condition includes the following steps: calculating a sum of A and B; and calculating the arithmetic and / or bitwise expression of the Boolean condition as 1 minus the remainder of the sum divided by the base.

11. The method as described in claim 3, wherein the first variable A and the second variable B comprise matrix-type data, and the method comprises the steps of: splitting each of the first variable A and the second variable B into corresponding first pairs of binary pairs of the first variable A and second pairs of binary pairs of the second variable B; and forming smaller versions of each of the first variable A and the second variable B for comparison using representative numbers from a mathematical sequence, wherein the differences between members of the mathematical sequence are progressively larger; wherein each of the representative numbers for the smaller version of the first variable A is calculated based on the members of the mathematical sequence, the index of which is equal to the data value in the first pairs of binary pairs of the first variable A; wherein each of the representative numbers for the smaller version of the second variable B is calculated based on the members of the mathematical sequence, the index of which is equal to the data value in the second pairs of binary pairs of the second variable B; and wherein, When each of the first variable A and the second variable B has an odd number of elements, a single element is removed from each of the first variable A and the second variable B before the split, and the single element from each of the first variable A and the second variable B is added to the smaller versions of the first variable A and the second variable B respectively.

12. The method as described in claim 11, wherein the forming step comprises the following steps: calculating the representative numbers for the smaller version of the first variable A by summing two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the first pairs of binary pairs of the first variable A for each element of the smaller version of the first variable A; and calculating the representative numbers for the smaller version of the second variable B by summing two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the second pairs of binary pairs of the second variable B for each element of the smaller version of the second variable B.

13. The method as described in claim 11, comprising the step of sorting each of the first variable A and the second variable B, wherein the step of sorting a matrix-type data variable comprises the following steps: instantiating a new variable having the same number of elements as the matrix-type data variable; dividing the matrix-type data variable into a plurality of sub-parts, the number of which is equal to the number of processing threads to be used to perform the sorting; each of the respective processing threads determining a position index of each element in the sub-part by comparing a value of each element of the sub-part with all other values ​​in the matrix-type data variable and counting how many of the elements of the matrix-type data variable are less than or greater than the comparison element of the sub-part for a reciprocal position index; replacing the values ​​in the new variable with values ​​from the matrix-type data variable in ascending or descending order according to the position indices determined by the processing threads; and replacing any unchanged values ​​in the new variable with a left-adjacent element value or a right-adjacent element value in the new variable, depending on whether the sorting order is ascending or descending; This new variable is used as a sorted version of the data variable for this matrix type.

14. The method as described in claim 11, comprising the steps of: calculating first positional variables for the first pairs of elements of the first variable A; and calculating second positional variables for the second pairs of elements of the second variable B; wherein calculating each positional variable of a pair of elements comprises exponentiation of a number equal to negative 1 using the result of the Boolean condition Y > X, where X is the first element of the pair and Y is the second element of the pair; and wherein the forming step comprises the steps of: The representative numbers for the smaller version of the first variable A are calculated by multiplying one of the first positional variables for each element of the smaller version of the first variable A by the sum of two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the first pairs of the first variable A; and the representative numbers for the smaller version of the second variable B are calculated by multiplying one of the second positional variables for each element of the smaller version of the second variable B by the sum of two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the second pairs of the second variable B.

15. The method as described in claim 3, wherein the base is equal to 2, wherein the processor uses a binary system, and wherein the last bit of the exponent is taken as the square root of the remainder when the exponent is divided by the base.

16. The method as described in claim 3, wherein the processor uses a binary system, and wherein the calculated exponent is used to exponentiate the base by shifting a bit equal to 1 to the left by a bit equal to the calculated exponent.

17. The method as described in claim 1, wherein the Bollinger condition is A < B, and wherein the step of transforming the Bollinger condition into an arithmetic and / or bitwise expression of the Bollinger condition comprises the following steps: subtracting B from A; calculating a borrow value of the result of the arithmetic and / or bitwise expression of the Bollinger condition being A minus B.

18. The method as described in claim 1, wherein the step of providing the arithmetic and / or bitwise expression of the computer program includes the following steps: segmenting the arithmetic and / or bitwise expression of the computer program into a plurality of segments of the arithmetic and / or bitwise expression; and wherein the segments of the arithmetic and / or bitwise expression are used to be executed in parallel.

19. The method as described in claim 2, wherein the Bolin condition includes a subsequent task expressed as an arithmetic description, and wherein the step of generating the arithmetic and / or bitwise expression of the computer program includes the following steps: multiplying the subsequent task with the arithmetic and / or bitwise expression of the Bolin condition.

20. The method as described in claim 19, wherein the Boolean condition includes an alternative task expressed as an arithmetic statement, and wherein the step of generating the arithmetic and / or bitwise expression of the computer program includes the following steps: multiplying the alternative task by 1 minus the arithmetic and / or bitwise expression of the Boolean condition.

21. The method as described in claim 2, wherein the Bolin condition includes a subsequent task expressed as a non-arithmic statement in formula, and wherein the step of generating the arithmetic and / or bitwise expression of the computer program includes the following steps: including an unconditional jump in the arithmetic and / or bitwise expression of the computer program to a label associated with the arithmetic and / or bitwise expression of the Bolin condition.

22. The method as described in request 21, wherein the label is equal to the beginning of a description of the subsequent task when a value of the arithmetic and / or bitwise expression of the Boolean condition is equal to 1.

23. The method as described in claim 22, wherein the Bolin condition includes an alternative task expressed as a non-arithmic description, wherein the label is equal to the beginning of a description of the alternative task when the value of the arithmetic and / or bitwise expression of the Bolin condition is equal to 0.

24. The method as described in claim 1, wherein the method further comprises the step of: executing the arithmetic and / or bitwise expression of the computer program by the arithmetic and / or bitwise operation unit.

25. The method as described in claim 24, wherein at least the transformation is performed by a first computer and the execution is performed by a second computer.

26. The method as described in claim 24, wherein the transformation and the execution are performed by the same computer.

27. A system comprising: One or more instruction processing units, including at least one control unit, at least one arithmetic and / or bitwise operation unit, and at least one temporary register unit; and one or more memory units coupled to one or more instruction processing units; wherein the system is used to execute arithmetic and / or bitwise expressions of substantially all conditional statements including a Boolean condition in a computer program by using the at least one arithmetic and / or bitwise operation unit to execute arithmetic and / or bitwise expressions of substantially all conditional statements including a Boolean condition.

28. The system of claim 27, wherein the at least one control unit or a separate data processing device of the system is used to perform the method operation as described in any one of claims 1-26, and includes the at least one arithmetic and / or bitwise operation unit of the processor of the one or more instruction processing units for executing the arithmetic and / or bitwise expression of the computer program.

29. The system as claimed in claim 27, wherein the at least one arithmetic and / or bitwise operation unit includes one or more of an arithmetic block, a bitwise shift block, and a bitwise logic block, and wherein the at least one arithmetic and / or bitwise operation unit does not include any bit comparator.

30. A method comprising the steps of: accessing a computer program including a conditional description, the conditional description including a Boolean condition for comparing a first variable A and a second variable B, wherein each of the first variable A and the second variable B includes matrix-type data; Each of the first variable A and the second variable B is split into a first pair of pairs of the first variable A and a second pair of pairs of the second variable B; and smaller versions of each of the first variable A and the second variable B are formed using representative numbers from a mathematical sequence for comparison, wherein the differences between the members of the mathematical sequence increase progressively, wherein each of the representative numbers for the smaller version of the first variable A is calculated based on the members of the mathematical sequence, where the index in the mathematical sequence is equal to the data value in the first pair of pairs of the first variable A, and each of the representative numbers for the smaller version of the second variable B is calculated based on the members of the mathematical sequence, where the index in the mathematical sequence is equal to the data value in the second pair of pairs of the second variable B, and wherein when each of the first variable A and the second variable B has an odd number of elements, Before the split, a single element is removed from each of the first variable A and the second variable B, and the single element from each of the first variable A and the second variable B is added to the smaller versions of the first variable A and the second variable B, respectively; when the computer program is run, the smaller versions of the first variable A and the second variable B are compared to evaluate the Boolean condition described in the condition statement.

31. The method as described in claim 30, wherein the forming step comprises the following steps: calculating the representative numbers for the smaller version of the first variable A by summing two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the first pairs of binary pairs of the first variable A for each element of the smaller version of the first variable A; and calculating the representative numbers for the smaller version of the second variable B by summing two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the second pairs of binary pairs of the second variable B for each element of the smaller version of the second variable B.

32. The method as described in claim 30, comprising the steps of: calculating first positional variables for the first pairs of elements of the first variable A; and calculating second positional variables for the second pairs of elements of the second variable B; wherein calculating each positional variable of a pair of elements comprises exponentiation of a number equal to negative 1 using the Boolean condition Y > X, where X is the first element of the pair and Y is the second element of the pair; and wherein the forming step comprises the following steps: The representative numbers for the smaller version of the first variable A are calculated by multiplying one of the first positional variables for each element of the smaller version of the first variable A by the sum of two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the first pairs of the first variable A; and the representative numbers for the smaller version of the second variable B are calculated by multiplying one of the second positional variables for each element of the smaller version of the second variable B by the sum of two of the corresponding members of the mathematical sequence corresponding to the data values ​​in the second pairs of the second variable B.

33. A system comprising: One or more instruction processing units, including at least one control unit, at least one arithmetic and / or bitwise operation unit, and at least one temporary register unit; and one or more memory units coupled to one or more instruction processing units; wherein the one or more memory units are configured to cause the one or more instruction processing units to perform the method operations as described in any one of claims 30-32.

34. A method for sorting a matrix-type data target, the method comprising the steps of: instantiating a new target having the same number of elements as the matrix-type data target; dividing the matrix-type data target into a plurality of sub-parts, the number of sub-parts being equal to the number of processing threads to be used to perform the sorting; each of the respective processing threads determining a position index of each element in the sub-part to be disposed of by the processing thread by comparing a value of each element of the sub-part with all other values ​​in the matrix-type data target and counting how many of the elements of the matrix-type data target are less than or greater than the comparison element of the sub-part for a reciprocal position index, wherein the determination includes performing the method as described in any one of claims 1-12 and 14-26; Based on the position indices determined by the processing threads, the values ​​in the new target are replaced with values ​​from the matrix-type data target in ascending or descending order; and depending on whether the sorting order is ascending or descending, any unchanged values ​​in the new target are replaced with a left-adjacent element value or a right-adjacent element value in the new target, wherein the new target serves as a sorted version of the matrix-type data target.

35. A system comprising: One or more instruction processing units, including at least one control unit, at least one arithmetic and / or bitwise operation unit, and at least one temporary register unit; and one or more memory units coupled to one or more instruction processing units; wherein the one or more memory units are used to cause the one or more instruction processing units to perform the method operation as described in claim 34.