IsEnabled - Maple Help

# Online Help

###### All Products    Maple    MapleSim

CUDA

 IsEnabled
 check if CUDA(R) acceleration is turned on

 Calling Sequence IsEnabled( )

Description

 • The IsEnabled function returns a value of true if Compute Unified Device Architecture (CUDA) acceleration is turned on and false otherwise.
 • Use the Enable function to turn CUDA acceleration on and off.
 • 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.

 > $n≔4000:$
 > $\mathrm{M1}≔\mathrm{LinearAlgebra}:-\mathrm{RandomMatrix}\left(n,n,\mathrm{datatype}=\mathrm{float}\left[4\right]\right):$
 > $\mathrm{M2}≔\mathrm{LinearAlgebra}:-\mathrm{RandomMatrix}\left(n,n,\mathrm{datatype}=\mathrm{float}\left[4\right]\right):$
 > $\mathrm{CUDA}:-\mathrm{IsEnabled}\left(\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{tNoCUDA}≔\mathrm{time}\left[\mathrm{real}\right]\left(\mathrm{M1}·\mathrm{M2}\right)$
 ${\mathrm{tNoCUDA}}{≔}{13.823}$ (2)
 > $\mathrm{CUDA}:-\mathrm{Enable}\left(\mathrm{true}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{CUDA}:-\mathrm{IsEnabled}\left(\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{tCUDA}≔\mathrm{time}\left[\mathrm{real}\right]\left(\mathrm{M1}·\mathrm{M2}\right)$
 ${\mathrm{tCUDA}}{≔}{1.163}$ (5)
 > $\mathrm{evalf}\left(\frac{\mathrm{tNoCUDA}}{\mathrm{tCUDA}}\right)$
 ${11.88564058}$ (6)
 > $\mathrm{CUDA}:-\mathrm{Enable}\left(\mathrm{false}\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{CUDA}:-\mathrm{IsEnabled}\left(\right)$
 ${\mathrm{false}}$ (8)

 See Also