Enable - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


CUDA

  

Enable

  

turn on or turn off CUDA(R) acceleration

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Enable( bool )

Parameters

bool

-

( truefalse ) turn on or turn off CUDA acceleration

Description

• 

The Enable function turns Compute Unified Device Architecture (CUDA) acceleration on and off. By default, CUDA acceleration is turned off.

• 

Note: The Enable function returns the previous setting for CUDA acceleration. For example, if you run the CUDA:-Enable(true) function when CUDA acceleration is turned off, CUDA acceleration will then be turned on, but the function will return a value of  false because CUDA acceleration was previously turned off. See the examples below.

• 

If your computer does not support CUDA, an error will be displayed. For more information about supported hardware, see Supported Hardware for CUDA Acceleration.

Examples

Run these examples on a computer that supports CUDA.

n4000:

M1LinearAlgebra:-RandomMatrixn,n,datatype=float4:

M2LinearAlgebra:-RandomMatrixn,n,datatype=float4:

CUDA:-IsEnabled

false

(1)

tNoCUDAtimereal`.`M1,M2

tNoCUDA13.823

(2)

CUDA:-Enabletrue

false

(3)

CUDA:-IsEnabled

true

(4)

tCUDAtimereal`.`M1,M2

tCUDA1.163

(5)

evalftNoCUDAtCUDA

11.88564058

(6)

CUDA:-Enablefalse

true

(7)

CUDA:-IsEnabled

false

(8)

See Also

CUDA

CUDA[Properties]

Supported Hardware for CUDA Acceleration