Patent ID: 7392256

Claim:
A computer-implemented method of transferring data between two application data structures, the method comprising: copying a first data gather scatter program (DGSP) from an exporting process address space where a first application data structure is located to a location in shared memory that is visible to an importing process address space; assembling a first parameter set in the shared memory location that identifies the first application data structure in the exporting process address space; starting a data gather scatter-redistribution machine (DGS-RM) in an importing process space where a second application data structure is located passing the first parameter set and the copy of the first DGSP to the DGS-RM, both the first parameter set and copy having been copied to shared memory, and a second parameter set identifying the second application data structure and a second DGSP, both local to the importing process space; determining a mode of operation from a push mode and a pull mode; creating a master stack machine and a worker stack machine, and wherein the mode of operation is determined to be one of: a pull mode, comprising: identifying a contiguous chunk of the first application data structure in the exporting process address space by the master stack machine, the master stack machine running under control of the DGSP previously copied from the exporting process space; identifying as many contiguous chunks of the second application data structure in the importing process address space, by the worker stack machine, as needed to receive all bytes of the contiguous chunk of the first application data structure, the worker stack machine running under control of the DGSP in the importing process address space; and copying (pulling) the bytes of the identified chunk of the first application data structure, by the worker stack machine, from the first application data structure to the as many as needed identified contiguous chunks of the second application data structure; and a push mode, comprising: identifying a contiguous chunk of the first application data structure in the exporting process address space by the master stack machine, the master stack machine running under control of the DGSP previously copied from the exporting process space; identifying as many contiguous chunks of the second application data structure in the importing process address space, by the worker stack machine, as needed to supply all bytes to the contiguous chunk of the first application data structure, the worker stack machine running under control of the DGSP in the importing process address space; and copying (pushing) the bytes for the identified chunk of the first application data structure, by the worker stack machine, to the first application data structure from the as many as needed identified contiguous chunks of the second application data structure.