handybeam.cl_system

Provides wrappers to the OpenCL high-performance code and functions

these include e.g. beam forming coefficient solvers, propagators, e.t.c

class handybeam.cl_system.OpenCLSystem(parent=None, use_config_file=True, use_this_config_file_full_path=None, use_platform=0, use_device=0, print_feedback=False)[source]

initializes the OpenCL subsystem, stores session info

usage: q=handybeam.cl_system.OpenCLSystem()

__init__(parent=None, use_config_file=True, use_this_config_file_full_path=None, use_platform=0, use_device=0, print_feedback=False)[source]

Boots the OpenCL subsystem.

Selects the execution device, compiles the source codes e.t.c.

Parameters:
  • parent (link to the parent object) –
  • use_config_file (if True, an attempt will be made to read the configuration from the cl_platform_config.ini file.) –
  • use_this_config_file_full_path (DESCRIPTION HERE) –
  • use_platform (DESCRIPTION HERE) –
  • use_device (DESCRIPTION HERE) –
  • print_feedback (DESCRIPTION HERE) –
__repr__

Return repr(self).

__str__

Return str(self).

checks_and_feedback()[source]

DESCRIPTION HERE

Todo

Note To Salvador. Your automatically generated docstrings are actually NOT compatible with the Numpy standard.

Todo

Currently, the constants are written to a file, and then reloaded and compiled. Replace this method with a dynamic templating system.

See the: numpydoc docstring guide

DESCRIPTION HERE

print_current_device(end='\n')[source]

Reports on the currently selected device.

The name of the currently selected device is channeled to :code:’print’

does print('Current compute device:{}'.format(self.device.name), end=end)

Parameters:end (string) – the character to attach to the end of the “print” command. Set to :code:` ` to disable newline. Default: \n
print_sysinfo()[source]

prints detailed OpenCL system information.

handybeam.cl_system.cl_config_file_name = 'cl_platform_config.ini'

constant, file name to store the configuration of the OpenCL subsystem.

Type:string
handybeam.cl_system.print_cl_platforms()[source]

print the available OpenCL platforms.

usage: handybeam.cl_system.print_cl_platforms()

handybeam.cl_system.select_cl_platform(use_platform=0, use_device=0)[source]

attempts to store the platform ID and device ID to a configuration file, to reduce the hassle of selecting it when the world starts.

Parameters:
  • use_platform (integer) – platform ID number. Typically, 0-3. Use print_cl_platforms() to figure out. Default: 0.
  • use_device (integer) – device ID number. Typically, 0-3. Use print_cl_platforms() to figure out. default: 0.

Back to Index

Licence (documentation): Creative Commons CC BY-NC-SA 4.0

Licence (source code): Apache 2.0

EU logo

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 737087.