Initialise the Context.
gpuInit(deviceID, platformID)
Initialise the GPU "deviceID". This deviceID can be show by gpuDeviceInfo()
By default deviceID is set to 0.
Initialise the platform with id "platformID". This platformID is the nth platform show by gpuDeviceInfo()
By default platformID is set to 0.
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.