Threads - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Multithreaded Programming : Threads

Threads

tools for parallel programming

 

Calling Sequence

Description

List of Threads Package Commands

List of Threads Sub-packages

Calling Sequence

Threads[command](arguments)

command(arguments)

Description

• 

The Threads package provides user-level commands for writing parallel code in Maple.  This allows multiple paths of execution to run concurrently. This can allow Maple to perform a greater number of computations per second when running on a multi-core machine.  See multithreaded for more information.

• 

The best tool for parallel programming in Maple is the Task Programming Model.

• 

Each command in the Threads package can be accessed by using either the long form or the short form of the command name in the command calling sequence.  For more information, see the UsingPackages help page.

List of Threads Package Commands

Add

Create

Map

Mul

Self

Seq

Sleep

Wait

• 

The Create function creates a new thread and evaluates a Maple expression in that thread.

• 

The Wait function suspends the execution of the current thread until a group of running threads has terminated.  The Sleep function pauses the execution for a specified length of time.

• 

The Self function returns the thread identifier of the current thread.

• 

The Add, Map, Mul, and Seq functions are parallelized versions of the traditional add, map, mul, and seq functions.

List of Threads Sub-packages

ConditionVariable

Mutex

Task

 

• 

The Task sub-package provides a high-level programming interface for developing parallel code.  The Task interface is the preferred interface for developing parallel code.

• 

The Mutex sub-package provides functions to control access to shared data structures. By using mutexes, one can create sections of code that can be executed only by one thread at a time.

• 

The ConditionVariable sub-package provides functions that allow threads to synchronize their execution.  Using condition variables, threads can pause their execution until they are signaled by another thread.

See Also

examples,Task

examples,Threads

help

module

multithreaded

Threads[ConditionVariable]

Threads[Mutex]

Threads[Task]

UsingPackages

with

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam