IP Library › Granted Patent US 8,627,043
Granted Patent B2
US 8,627,043 · App. 13/430,168 · Granted Jan 7, 2014

Data parallel function call for determining if called routine is data parallel

Inventors: Alexandre E. Eichenberger (Chappaqua, NY); Brian K. Flachs (Georgetown, TX); Charles R. Johns (Austin, TX); Mark R. Nutter (Austin, TX)
Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,627,043
App. No.
13/430,168
Granted
Jan 7, 2014
Kind
B2
Abstract

Mechanisms for performing data parallel function calls in code during runtime are provided. These mechanisms may operate to execute, in the processor, a portion of code having a data parallel function call to a target portion of code. The mechanisms may further operate to determine, at runtime by the processor, whether the target portion of code is a data parallel portion of code or a scalar portion of code and determine whether the calling code is data parallel code or scalar code. Moreover, the mechanisms may operate to execute the target portion of code based on the determination of whether the target portion of code is a data parallel portion of code or a scalar portion of code, and the determination of whether the calling code is data parallel code or scalar code.

Claims (20)

1. A method, in a data processing system having a processor, for performing data parallel function calls in code during runtime, comprising:

executing, in the processor, a portion of code having a data parallel function call to a target portion of code, wherein the portion of code having the data parallel function call is calling code;

determining, at runtime by the processor, whether the target portion of code is a data parallel portion of code or a scalar portion of code;

determining, at runtime by the processor, whether the calling code is data parallel code or scalar code; and

executing the target portion of code, where the manner of execution of the target portion of code is based on the determination of whether the target portion of code is a data parallel portion of code or a scalar portion of code, and the determination of whether the calling code is data parallel code or scalar code;

wherein if the calling code is scalar code, and the target portion of code is a data parallel portion of code, the processor is configured to execute the target portion of code by calling the target portion of code with a mask to identify a preferred slot of a vector register.

2. The method of claim 1 , wherein if the calling code is data parallel code, and the target portion of code is a data parallel portion of code, executing the target portion of code comprises:

executing, by the processor, the target portion of code in a data parallel manner using one or more parallel execution groups.

3. The method of claim 1 , wherein if the calling code is scalar code, and the target portion of code is a data parallel portion of code, executing the target portion of code comprises:

converting results of the target portion of code to a scalar format.

4. The method of claim 1 , wherein determining, at runtime by the processor, whether the target portion of code is a data parallel portion of code or a scalar portion of code comprises retrieving a sentinel value associated with the target portion of code and analyzing the sentinel value to determine if the sentinel value indicates the target portion of code to be data parallel or scalar.

5. The method of claim 4 , wherein the sentinel value is stored in a known location relative to an address of the target portion of code.

6. The method of claim 4 , wherein the sentinel value is generated by one of a compiler or a linker based on whether or not the compiler successfully applied a data parallel optimization to the target portion of code.

7. The method of claim 1 , wherein the portion of code is executed as part of a parallel execution group comprising a plurality of iterations of the portion of code, each iteration in the plurality of iterations being associated with a separate vector register slot or separate thread of execution in the processor.

8. The method of claim 7 , further comprising:

generating the parallel execution group by comparing an address stored in each separate vector register slot or targeted by each separate thread;

identifying separate vector register slots or threads targeting a same address;

combining the separate vector register slots or threads targeting the same address into the parallel execution group; and

setting a pointer to point to a first separate vector register slot or thread that targets an address different than the address of the target portion of code.

9. The method of claim 8 , wherein, in a subsequent execution of the iterations associated with the separate vector register slots or threads, a subsequent parallel execution group is generated based on the setting of the pointer.

Continuity (2)
Continuation 12649751 · Dec 30, 2009
Related Publication 20120180031A1 · Jul 12, 2012