Change current device to specified device.  
More...
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 af::deviceset | ( | const int | device | ) |  | 
      
 
 
§ setDevice()
      
        
          | AFAPI void af::setDevice | ( | const int | device | ) |  | 
      
 
Sets the current device. 
- Parameters
- 
  
    | [in] | device | The ID of the target device |  
 
- Examples: 
- benchmarks/blas.cpp, benchmarks/fft.cpp, benchmarks/pi.cpp, computer_vision/fast.cpp, computer_vision/harris.cpp, computer_vision/matching.cpp, computer_vision/susan.cpp, financial/black_scholes_options.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/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/bagging.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, and pde/swe.cpp.