<< gpuGetData sciGPGPU gpuInsert >>

sciGPGPU >> sciGPGPU > gpuInit

gpuInit

Initialise the Context.

Call sequence

gpuInit(deviceID, platformID)

Parameters

deviceID

Initialise the GPU "deviceID". This deviceID can be show by gpuDeviceInfo()

By default deviceID is set to 0.

platformID

Initialise the platform with id "platformID". This platformID is the nth platform show by gpuDeviceInfo()

By default platformID is set to 0.

Description

gpuDeviceInfo()
gpuInit()
gpuInit(0) // same as gpuInit()
gpuInit(1) // initializes GPU 1
gpuInit(0, 1) // initializes GPU 0 of platform 1
gpuInit(0, 1) // do nothing

gpuInit() initializes the gpu to work. This function must be call before any other functions. This function is called when the toolbox loading. By default, gpuInit initializes the GPU 0 on platform 0. The "deviceID" argument allows the toolbox to use another GPU. The "platformID" argument allows the toolbox to use another platform. The use of gpuInit will erase all data in GPU and make a new context except if gpuInit is called with same value of last call.

See Also


Report an issue
<< gpuGetData sciGPGPU gpuInsert >>