< GeeXLab Reference Guide />

> Back to Reference Guide Index


gh_opencl library

Description

gh_opencl is the module that manages OpenCL functions. Currently OpenCL functions only covers simple API queries.


Number of functions: 6

  1. gh_opencl.get_device_compute_units_info (Lua - Python)
  2. gh_opencl.get_device_info (Lua - Python)
  3. gh_opencl.get_device_type (Lua - Python)
  4. gh_opencl.get_num_platforms (Lua - Python)
  5. gh_opencl.get_num_devices (Lua - Python)
  6. gh_opencl.get_platform_info (Lua - Python)



get_device_compute_units_info

Description

Returns the information about a the compute units of an OpenCL device.


Syntax

max_compute_units, clock_freq, flops = gh_opencl.get_device_compute_units_info(
 platform_index,
 device_index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
max_compute_units, clock_freq, flops = gh_opencl.get_device_compute_units_info(0, 0)
            


get_device_info

Description

Returns the identification information about an OpenCL device.


Syntax

vendor, name, version = gh_opencl.get_device_info(
 platform_index,
 device_index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
vendor, name, version = gh_opencl.get_device_info(0, 0)
            


get_device_type

Description

Returns the type (GPU or CPU) of an OpenCL device.


Syntax

type = gh_opencl.get_device_type(
 platform_index,
 device_index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
type = gh_opencl.get_device_type(0, 0)
            


get_num_platforms

Description

Returns the number of OpenCL platforms.


Syntax

num_platforms = gh_opencl.get_num_platforms()

Languages

Lua - Python


Parameters

This function has no input parameter(s).


Return Values


Code sample

    
num_platforms = gh_opencl.get_num_platforms()
            


get_num_devices

Description

Returns the number of OpenCL devices of a particular platform.


Syntax

num_devices = gh_opencl.get_num_devices(
 platform_index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
num_devices = gh_opencl.get_num_devices(0)
            


get_platform_info

Description

Returns the main information about an OpenCL platform.


Syntax

vendor, name, version = gh_opencl.get_platform_info(
 platform_index
)

Languages

Lua - Python


Parameters


Return Values


Code sample

    
vendor, name, version = gh_opencl.get_platform_info(0)
            






GeeXLab Rootard Guide | Downloads | Contact | Newsletter