Skip to content

Commit

Permalink
python/sixtracklib: fixes access to OpenCL related C99 symbols if Ope…
Browse files Browse the repository at this point in the history
…nCL support is disabled
  • Loading branch information
Martin Schwinzerl committed Jan 24, 2020
1 parent a85fa3e commit cd04c6b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions python/sixtracklib/trackjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
st_OutputBuffer_required_for_tracking,
st_OutputBuffer_requires_output_buffer,
st_OutputBuffer_calculate_output_buffer_params,
st_OpenCL_get_available_nodes_required_str_capacity,
st_OpenCL_get_all_nodes_required_str_capacity,
st_OpenCL_get_available_nodes_as_string,
st_OpenCL_get_all_nodes_as_string,
st_TrackJob_get_type_str,
st_TrackJobNew_track_elem_by_elem,
st_TrackJobNew_track_line,
Expand Down Expand Up @@ -142,6 +138,14 @@
st_TrackJobNew_uses_arguments,
)

if stconf.SIXTRACKLIB_MODULES.get("opencl", False):
from .stcommon import (
st_OpenCL_get_available_nodes_required_str_capacity,
st_OpenCL_get_all_nodes_required_str_capacity,
st_OpenCL_get_available_nodes_as_string,
st_OpenCL_get_all_nodes_as_string,
)


class TrackJobBaseNew(object):
def __init__(self, ptr_track_job=None, owns_ptr=True):
Expand Down

0 comments on commit cd04c6b

Please sign in to comment.