build Module

class build.Code(init='')

Bases: object

add(code='')
add_line(line='')
string
class build.SharedLib(kernel, dat_dict, openmp=False)

Bases: object

Generic base class to loop over all particles once.

Parameters:
  • n (int) – Number of elements to loop over.
  • kernel (kernel) – Kernel to apply at each element.
  • dat_dict (dict) – Dictonary storing map between kernel variables

and state variables. :arg bool runtime.DEBUG: Flag to enable runtime.DEBUG flags.

creation_timer = None

Timer that times the creation of the shared library if runtime.BUILD_TIMER > 2

execute(dat_dict=None, static_args=None)
execute_overhead_timer = None

Times the overhead required before the shared library is ran if runtime.BUILD_TIMER > 2.

execute_timer = None

Timer that times the execution time of the shared library if runtime.BUILD_TIMER > 2

build.build_lib(lib, extensions=('.h', '.cpp'), source_dir='/tmp/build', CC=ICC, icc, -fPIC -std=c++0x -restrict -qopt-report=5 -m64 -openmp -lgomp -lpthread -lc -lrt, -lm, -O3 -xHost, -g, -c, -shared, restrict, dst_dir='/tmp/build', hash=True)
build.check_file_existance(abs_path=None)
build.load(filename)
build.load_library_exception(kernel_name='None supplied', unique_name='None supplied', looping_type='None supplied')

Attempts to create useful error messages for code generation.

Parameters:
  • kernel_name (str) – Name of kernel
  • unique_name (str) – Unique name given to kernel.
  • looping_type (loop) – Loop/Pairloop applied to kernel.
build.loop_unroll(str_start, i, j, step, str_end=None, key=None)

Function to create unrolled loops in python source. Potentialy add auto padding here?

Parameters:
  • str_start (str) – Starting string.
  • i (int) – Start index.
  • j (int) – End index.
  • step (int) – Stepsize between i and j.
  • str_end (str) – Ending string.
build.md5(string)

Create unique hex digest

build.simple_lib_creator(header_code, src_code, name, extensions=('.h', '.cpp'), dst_dir='/tmp/build', CC=ICC, icc, -fPIC -std=c++0x -restrict -qopt-report=5 -m64 -openmp -lgomp -lpthread -lc -lrt, -lm, -O3 -xHost, -g, -c, -shared, restrict)
build.source_write(header_code, src_code, name, extensions=('.h', '.cpp'), dst_dir='/tmp/build')

Previous topic

access Module

Next topic

cell Module

This Page