Programming - Maple Help

Programming Facilities Changes in Maple 13

Maple 13 includes the following changes to programming facilities.

 Task Programming Model The Threads[Task] subpackage provides a new multithreaded programming model. Using the Task Programming Model, scalable multithreaded code can be written in Maple. This model simplifies the process of writing multithreaded code, often removing the need to use synchronization routines. Going forward, most parallel code should be written using the Task Programming Model instead of calling Threads[Create].

OpenMaple[C]

New commands have been added to the OpenMaple[C] package.

 • MaplePushErrorProc and MaplePopErrorProc allow external code to register callback functions that are executed when errors occur.
 • The MapleGetInterruptValue function returns true if an interrupt has been received by the kernel and false otherwise. This can be used to check if an interrupt has occurred, but the external code needs to perform some cleanup before calling MapleCheckInterrupt.
 • The new MaplePushGMPAllocators and MaplePopGMPAllocators functions allow external code to register and unregister GMP memory allocation functions in a thread safe way.
 Preprocessor Extensions Maple language files that contain preprocessor directives may now be read using the read statement. This enables the use of directives such as $include and$define in a more flexible manner than was previously possible.