Preferences - System


System

This option requires a device which supports OpenCL 1.1 or greater. This is typically a GPU, but can also be a CPU or specialized device, provided it has OpenCL support.  Valid devices are listed in the Default OpenCL Device drop-down list.

Use OpenCL

Select this check box to enable OpenCL in BCALC. When this is enabled, BCALC will attempt to use the selected OpenCL device to perform calculations. Depending on the device selected and the BCF script, this can be noticeably faster than the default CPU processing. If BCALC cannot run a particular script on the OpenCL device, it will fall back to the standard CPU method.

BCALC scripts can be evaluated with either the old CPU method, or with a parallel processor (GPU) on a graphics card or other device with OpenCL. If a GPU device is selected in preferences, the GPU will be tried first, but if there is some incompatibility, the CPU method is used.

The card needs to support OpenCL 1.1 and it needs to support the 'double' type. The OpenCL setup panel will not list a graphics card that does not meet these criteria.

Script evaluation will use the CPU method if the script uses a feature which is not compatible with OpenCL scripts. OpenCL cannot be used if the script contains an accumulation calculation. For example, if the bcalc script contains "sum = sum + volume", the script is performing an accumulation, so the script must be evaluated using the CPU method. Another feature that could cause evaluation to use the CPU method is to include a "begin_init" section or a 'begin_exit" section.