ArrayFire: setDevice

Change current device to specified device. More...

Functions

AFAPI void deviceset (const int device)
 
AFAPI void setDevice (const int device)
 Sets the current device. More...
 
AFAPI af_err af_set_device (const int device)
 
AFAPI af_err af_get_device (int *device)
 

Change current device to specified device.

These functions change the current device. Operations after this called will be performed on the set device.


◆ af_get_device()

◆ af_set_device()

◆ deviceset()

AFAPI void deviceset ( const int  device)
AFAPI void setDevice ( const int  device)

Sets the current device.

Parameters
[in]deviceThe ID of the target device
Examples
computer_vision/fast.cpp, computer_vision/harris.cpp, computer_vision/matching.cpp, computer_vision/susan.cpp, getting_started/convolve.cpp, getting_started/integer.cpp, getting_started/rainfall.cpp, graphics/fractal.cpp, helloworld/helloworld.cpp, image_processing/adaptive_thresholding.cpp, image_processing/binary_thresholding.cpp, image_processing/brain_segmentation.cpp, image_processing/deconvolution.cpp, image_processing/edge.cpp, image_processing/filters.cpp, image_processing/image_demo.cpp, image_processing/image_editing.cpp, image_processing/morphing.cpp, image_processing/optical_flow.cpp, image_processing/pyramids.cpp, lin_algebra/cholesky.cpp, lin_algebra/lu.cpp, lin_algebra/qr.cpp, lin_algebra/svd.cpp, machine_learning/deep_belief_net.cpp, machine_learning/kmeans.cpp, machine_learning/knn.cpp, machine_learning/logistic_regression.cpp, machine_learning/naive_bayes.cpp, machine_learning/neural_network.cpp, machine_learning/perceptron.cpp, machine_learning/rbm.cpp, machine_learning/softmax_regression.cpp, pde/bhrt.cpp, pde/boltzmann_cfd.cpp, and pde/swe.cpp.