setGPU: ~~ Methods for Function 'setGPU' in Package 'HiPLARM' ~~

Description Usage Arguments Details Methods Examples

Description

~~ Methods for function setGPU in package HiPLARM ~~

Usage

1
setGPU(proc, interface)

Arguments

proc

A numeric or logical value that enables or disable the argument passed to interface, i.e the CPU or GPU interface or if no argument is passed to interface then the MAGMA library is enabled or disabled.

interface

A character string of either "CPU" or "GPU" determining which interface to use. If no argument is given the MAGMA library is disabled.

Details

The MAGMA library provides two different interfaces to the GPU. The "CPU" interface automatically transfers the data to and from the GPU as well as choosing the multi-gpu option automatically should the user have multiple GPUs. This is the most flexible or options and should it be available is used by default. However, some MAGMA functions are only implemented for the "GPU" interface. In this case the data transfers and other options must be given explicitly for the function call. If this is the case, this is the default option, however, at an R level the user will see no difference. We also provide the option of disabling the GPU and using the regular LAPACK call should the user wish to test results.

Methods

signature(proc = "logical", interface = "character")

This allows the user to choose the CPU or GPU interface. Should the user wish to enable a certain interface the string "CPU" or "GPU" are passed as the interface argument and the proc argument is set to TRUE or FALSE.

signature(proc = "logical", interface = "missing")

This allows the user to enable or disable the GPU if no argument is passed to interface. Setting proc to TRUE or FALSE enables or disables the GPU.

signature(proc = "numeric", interface = "character")

This allows the user to choose the CPU or GPU interface. Should the user wish to enable a certain interface the string "CPU" or "GPU" are passed as the interface argument and the proc argument is set to 1 or 0.

signature(proc = "numeric", interface = "missing")

This allows the user to enable or disable the GPU if no argument is passed to interface. Setting proc to 1 or 0 enables or disables the GPU.

Examples

1
2
3
setGPU(TRUE,"CPU") # enables CPU interface where available
setGPU(TRUE,"GPU") # enables GPU interface only
setGPU(FALSE) #disables MAGMA library

HiPLARM documentation built on May 29, 2017, 10:42 p.m.

Related to setGPU in HiPLARM...