Parallel execution of function calls in a graphical model
AssigneeThe MathWorks, Inc.
InventorsSteven E. Kuznicki, Chad M. Van Fleet
Life of this patent
Estimating the term…
Abstract
A method, tangible computer-readable medium and apparatus for concurrently executing subsystems in a graphical model is provided. An embodiment can transform a conventional graphical model supporting single threaded execution into a model supporting multi-threaded execution through the replacement of a single block. The transformed model may support concurrent execution of a plurality of subsystems using a plurality of threads when the graphical model executes. An embodiment provides a user interface that allows a user to intuitively configure a model for current execution of the subsystems.
Claims21
A method comprising:
- associating processing information with a block of a model,
- the block being connected to a first subsystem of the model and a second subsystem of the model,
- the associating the processing information being performed by a device, and
- the processing information including:
- first information that associates first processing logic with the first subsystem, and
- second information that associates second processing logic with the second subsystem,
- the second processing logic being different from the first processing logic;
- evaluating the model to determine whether a data dependency exists between the first subsystem and the second subsystem,
- the evaluating the model being performed by the device;
- providing a notification, indicating that the first subsystem cannot be concurrently processed with the second subsystem, when the data dependency exists between the first subsystem and the second subsystem,
- the providing the notification being performed by the device;
- and
- when the data dependency does not exist between the first subsystem and the second subsystem:
- causing, during an execution of the model, the first subsystem to be processed by the first processing logic concurrently with the second subsystem being processed by the second processing logic,
- a first thread being associated with the first subsystem based on an identifier associated with executing the first subsystem,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the first subsystem being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first subsystem,
- the causing the first subsystem to be processed by the first processing logic concurrently with the second subsystem being processed by the second processing logic being performed by the device.
One or more non-transitory computer-readable media storing instructions, the instructions comprising:
- one or more instructions that, when executed by one or more processors, cause the one or more processors to:
- receive, during an execution of a model, a signal for initiating an execution of a subsystem,
- the subsystem including a group of functions for performing an operation associated with the execution of the model;
- initiate, based on the signal, the execution of the subsystem;
- determine whether a data dependency exists between a first group of functions included in the subsystem and a second group of functions included in another subsystem;
- provide a notification, indicating that the first group of functions cannot be concurrently processed with the second group of functions, when the data dependency exists between the first group of functions and the second group of functions;
- and
- when the data dependency does not exist between the first group of functions and the second group of functions:
- execute, on first processing logic and via a first thread, the first group of functions to perform a first operation associated with the execution of the model,
- the first processing logic and the first thread being associated with the first group of functions based on an identifier associated with executing the first group of functions,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the first group of functions being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first group of functions;
- execute, on second processing logic and via a second thread, the second group of functions to perform a second operation associated with the execution of the model,
- the first group of functions executing on the first processing logic concurrently with the second group of functions executing on the second processing logic;
- and
- generate, based on performing the first operation and the second operation, a result.
A method comprising:
- receiving, during an execution of a model, a signal for initiating an execution of a subsystem,
- the subsystem including a group of functions for performing an operation associated with the execution of the model, and
- the receiving the signal being performed by a device;
- initiating, based on the signal, the execution of the subsystem,
- the initiating the execution being performed by the device;
- determining whether a data dependency exists between a first group of functions included in the subsystem and a second group of functions included in another subsystem,
- the determining whether the data dependency exists being performed by the device;
- providing a notification, indicating that the first group of functions cannot be concurrently processed with the second group of functions, when the data dependency exists between the first group of functions and the second group of functions,
- the providing the notification being performed by the device;
- and
- when the data dependency does not exist between the first group of functions and the second group of functions:
- executing, on first processing logic and via a first thread, the first group of functions to perform a first operation associated with the execution of the model,
- the first processing logic and the first thread being associated with the first group of functions based on an identifier associated with the first group of functions,
- the identifier being selected from a group that includes a bit mask,
- a uniform resource locator, an address, and a name,
- the first group of functions being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first group of functions,
- the executing the first group of functions being performed by the device;
- executing, on second processing logic and via a second thread, the second group of functions to perform a second operation associated with the execution of the model,
- the first group of functions executing on the first processing logic concurrently with the second group of functions executing on the second processing logic, and
- the executing the second group of functions being performed by the device;
- and
- generating, based on performing the first operation and the second operation, a result,
- the generating the result being performed by the device.
One or more non-transitory computer-readable media storing instructions, the instructions comprising:
- one or more instructions that, when executed by one or more processors, cause the one or more processors to:
- receive program code generated based on a model that includes a concurrent function call generator block,
- the concurrent function call generator block configured to cause, during an execution of the model, a first subsystem to be processed on first processing logic concurrently with a second subsystem being processed on second processing logic,
- the second processing logic being different from the first processing logic;
- determine whether a data dependency exists between the first subsystem and the second sub system;
- provide a notification, indicating that the first subsystem cannot be concurrently processed with the second subsystem, when the data dependency exists between the first subsystem and the second subsystem;
- and
- when the data dependency does not exist between the first subsystem and the second subsystem:
- execute the program code to execute the model,
- executing the program code causing the concurrent function call generator block to cause the first subsystem to be processed on the first processing logic concurrently with the second subsystem being processed on the second processing logic,
- the first processing logic and a first thread being associated with the first subsystem based on an identifier associated with executing the first subsystem,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the first subsystem being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first subsystem.
A method comprising:
- receiving program code generated based on a model that includes a concurrent function call generator block,
- the receiving the program code being performed by a device, and
- the concurrent function call generator block being configured to cause, during an execution of the model, a first subsystem to be processed on first processing logic concurrently with a second subsystem being processed on second processing logic,
- the second processing logic being different from the first processing logic;
- determining whether a data dependency exists between the first subsystem and the second subsystem,
- the determining whether the dependency exists being performed by the device;
- providing a notification, indicating that the first subsystem cannot be concurrently processed with the second subsystem, when the data dependency exists between the first subsystem and the second subsystem,
- the providing the notification being performed by the device;
- and
- when the data dependency does not exist between the first subsystem and the second subsystem:
- executing the program code to execute the model,
- the executing the program code causing the concurrent function call generator block to cause the first subsystem to be processed on the first processing logic concurrently with the second subsystem being processed on the second processing logic,
- the first processing logic and a first thread being associated with the first subsystem based on an identifier associated with executing the first subsystem,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the first subsystem being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first subsystem, and
- the executing the program code being performed by the device.
One or more non-transitory computer-readable media storing instructions, the instructions comprising:
- one or more instructions that, when executed by one or more processors, cause the one or more processors to:
- obtain program code for executing a model that includes a plurality of subsystems;
- initiate an execution of the model based on the program code;
- execute, based on initiating the execution of the model, a first portion of the model;
- determine whether data dependencies exist between the plurality of subsystems;
- provide a notification, indicating that the plurality of subsystems cannot be concurrently processed, when the data dependencies exist between the plurality of subsystems;
- and
- when no data dependencies exist between the plurality of subsystems:
- initiate, based on executing the first portion of the model and based on no data dependencies existing between the plurality of subsystems, a concurrent execution of the plurality of subsystems associated with the model,
- first processing logic and a first thread being associated with one of the plurality of subsystems based on an identifier,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the one of the plurality of subsystems being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the one of the plurality of subsystems;
- receive, based on initiating the concurrent execution of the plurality of subsystems, a result associated with each subsystem, of the plurality of subsystems;
- and
- execute, based on receiving the result associated with each subsystem, a second portion of the model.
A method comprising:
- obtaining program code for executing a model that includes a plurality of subsystems,
- the obtaining the program code being performed by a device;
- initiating an execution of the model based on the program code,
- the initiating the execution of the model being performed by the device;
- executing, based on initiating the execution of the model, a first portion of the model,
- the executing the first portion of the model being performed by the device;
- determining whether data dependencies exist between the plurality of subsystems,
- the determining whether data dependencies exists being performed by the device;
- providing a notification, indicating that the plurality of subsystems cannot be concurrently processed, when the data dependencies exist between the plurality of subsystems,
- the providing the notification being performed by the device;
- and
- when no data dependencies exist between the plurality of subsystems:
- initiating, based on executing the first portion of the model and based on no data dependencies existing between the plurality of subsystems, a concurrent execution of the plurality of subsystems associated with the model,
- first processing logic and a first thread being associated with one of the plurality of subsystems based on an identifier,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the one of the plurality of subsystems being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the one of the plurality of subsystems,
- the initiating the concurrent execution of the plurality of subsystems being performed by the device;
- receiving, based on initiating the concurrent execution of the plurality of subsystems, a result associated with each subsystem, of the plurality of subsystems,
- the receiving the result associated with each subsystem being performed by the device;
- and
- executing, based on receiving the result associated with each subsystem, a second portion of the model,
- the executing the second portion of the model being performed by the device.
One or more non-transitory computer-readable media storing instructions, the instructions comprising:
- one or more instructions that, when executed by one or more processors, cause the one or more processors to:
- connect a block of a model to a first subsystem of the model and to a second subsystem of the model;
- determine whether a data dependency exists between the first subsystem and the second subsystem;
- provide a notification, indicating that the first subsystem cannot be concurrently processed with the second subsystem, when the data dependency exists between the first subsystem and the second subsystem;
- and
- selectively cause, during an execution of the model and based on whether the data dependency exists between the first subsystem and the second subsystem, one of:
- a concurrent execution of the first subsystem and the second subsystem, or
- a serial execution of the first subsystem and the second subsystem,
- the concurrent execution being caused when the data dependency does not exist between the first subsystem and the second subsystem, and
- the serial execution being caused when the data dependency does exist between the first subsystem and the second subsystem,
- first processing logic and a first thread being associated with the first subsystem based on an identifier associated with executing the first subsystem,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the first subsystem being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first subsystem.
A method comprising:
- connecting a block of a model to a first subsystem of the model and to a second subsystem of the model,
- the connecting the block being performed by a device;
- determining whether a data dependency exists between the first subsystem and the second subsystem,
- the determining whether the data dependency exists being performed by the device;
- providing a notification, indicating that the first subsystem cannot be concurrently processed with the second subsystem, when the data dependency exists between the first subsystem and the second subsystem,
- the providing the notification being performed by the device;
- and
- selectively causing, during an execution of the model and based on whether the data dependency exists between the first subsystem and the second subsystem, one of:
- a concurrent execution of the first subsystem and the second subsystem, or
- a serial execution of the first subsystem and the second subsystem,
- the concurrent execution being caused when the data dependency does not exist between the first subsystem and the second subsystem, and
- the serial execution being caused when the data dependency does exist between the first subsystem and the second subsystem,
- first processing logic and a first thread being associated with the first subsystem based on an identifier associated with executing the first subsystem,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the first subsystem being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first subsystem,
- the selectively causing the one of the concurrent execution or the serial execution being performed by the device.
One or more non-transitory computer-readable media storing instructions, the instructions comprising:
- one or more instructions that, when executed by one or more processors, cause the one or more processors to:
- associate processing information with a block of a model,
- the block being connected to a first subsystem of the model and a second subsystem of the model,
- the processing information including:
- first information that associates first processing logic with the first subsystem, and
- second information that associates second processing logic with the second subsystem,
- the second processing logic being different from the first processing logic;
- evaluate the model to determine whether a data dependency exists between the first subsystem and the second subsystem;
- and
- provide an indication, indicating that the first subsystem cannot be concurrently processed with the second subsystem, when the data dependency exists between the first subsystem and the second subsystem;
- or
- when the data dependency does not exist between the first subsystem and the second subsystem:
- cause, during an execution of the model, the first subsystem to be processed by the first processing logic concurrently with the second subsystem being processed by the second processing logic,
- a first thread being associated with the first subsystem based on an identifier associated with executing the first subsystem,
- the identifier being selected from a group that includes a bit mask, a uniform resource locator, an address, and a name,
- the first subsystem being processed by the first processing logic, via the first thread, based on the first processing logic and the first thread being associated with the first subsystem.
Dependencies are inferred from the claim text.