'Initializes the NRT
Must be called before any actual call to the NRT API.
Safe to be called multiple times.'

@lock_llvm
def initialize(self, ctx):

    if self._init:
        return
    for py_name in _nrt.c_helpers:
        c_name = ('NRT_' + py_name)
        c_address = _nrt.c_helpers[py_name]
        ll.add_symbol(c_name, c_address)
    self._library = nrtdynmod.compile_nrt_functions(ctx)
    self._ptr_inc = self._library.get_pointer_to_function('nrt_atomic_add')
    self._ptr_dec = self._library.get_pointer_to_function('nrt_atomic_sub')
    self._ptr_cas = self._library.get_pointer_to_function('nrt_atomic_cas')
    _nrt.memsys_set_atomic_inc_dec(self._ptr_inc, self._ptr_dec)
    _nrt.memsys_set_atomic_cas(self._ptr_cas)
    self._init = True
