Module: Yadriggy::C::Config

Defined in:
lib/yadriggy/c/config.rb

Overview

Compiler options etc.

Constant Summary collapse

HostOS =

Host OS

Returns:

  • (Symbol)

    :linux, :macos, :unknown.

case RbConfig::CONFIG['host_os']
when /linux/
  :linux
when /darwin/
  :macos
else
  :unknown
end
WorkDir =

Working directory.

'./yadriggy_tmp'
Compiler =

Compiler command.

Returns:

  • (String)
'gcc -shared -fPIC -Ofast '
CoptOutput =

Compiler option specifying the output file.

Returns:

  • (String)
'-o '
LibExtension =

The suffix to the name of a shared library such as .so. It has to start with a dot.

HostOS == :macos ? '.dylib' : '.so'
Headers =

Lines inserted in the generated C source file.

[
  '#include <stdint.h>',
  '#include <time.h>',
  '#include <math.h>',
  '#include <stdio.h>'
]
OpenCLoptions =

Compiler option for OpenCL

Returns:

  • (String)
'-framework opencl -DCL_SILENCE_DEPRECATION '
OpenCLHeaders =

Lines inserted in the generated OpenCL source file.

[ '#include <OpenCL/opencl.h>' ]