statistics
: Statistics¶
A module for performing basic statistical analysis (min, max, mean, std) on large data where numpy is not very efficient.
- class Statistics(size=None, dtype=None, template=None, ctx=None, devicetype='all', platformid=None, deviceid=None, block_size=None, profile=False)[source]¶
Bases:
OpenclProcessing
A class for doing statistical analysis using OpenCL
- Parameters
size (List[int]) – Shape of input data to treat
dtype (numpy.dtype) – Input data type
template (numpy.ndarray) – Data template to extract size & dtype
ctx – Actual working context, left to None for automatic initialization from device type or platformid/deviceid
devicetype (str) – Type of device, can be “CPU”, “GPU”, “ACC” or “ALL”
platformid (int) – Platform identifier as given by clinfo
deviceid (int) – Device identifier as given by clinfo
block_size (int) – Preferred workgroup size, may vary depending on the outcome of the compilation
profile (bool) – Switch on profiling to be able to profile at the kernel level, store profiling elements (makes code slightly slower)
- kernel_files = ['preprocess.cl']¶
- mapping = {<class 'numpy.int8'>: 's8_to_float', <class 'numpy.uint8'>: 'u8_to_float', <class 'numpy.int16'>: 's16_to_float', <class 'numpy.uint16'>: 'u16_to_float', <class 'numpy.uint32'>: 'u32_to_float', <class 'numpy.int32'>: 's32_to_float'}¶
- buffers = [BufferDescription(name='raw', size=1, dtype=<class 'numpy.float32'>, flags=4), BufferDescription(name='converted', size=1, dtype=<class 'numpy.float32'>, flags=1)]¶