Changes in / [c1681ea:b39debba] in sasview


Ignore:
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • sasview/custom_config.py

    r79492222 r62243ae  
    1515TOOLBAR_SHOW = True 
    1616DEFAULT_PERSPECTIVE = "Fitting" 
     17SAS_OPENCL = None 
  • sasview/local_config.py

    r49e000b r62243ae  
    140140UPDATE_TIMEOUT = 2 
    141141 
     142#OpenCL option 
     143SAS_OPENCL = None 
     144 
    142145def printEVT(message): 
    143146    if __EVT_DEBUG__: 
  • src/sas/sasgui/guiframe/gui_manager.py

    rd3911e3 r62243ae  
    152152SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT 
    153153SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME 
     154SAS_OPENCL = config.SAS_OPENCL 
    154155if not WELCOME_PANEL_ON: 
    155156    WELCOME_PANEL_SHOW = False 
     
    176177    else: 
    177178        DEFAULT_OPEN_FOLDER = PATH_APP 
     179    SAS_OPENCL = custom_config.SAS_OPENCL 
    178180except: 
    179181    DATALOADER_SHOW = True 
     
    190192    CLEANUP_PLOT = False 
    191193    DEFAULT_OPEN_FOLDER = PATH_APP 
    192  
     194    SAS_OPENCL = None 
    193195DEFAULT_STYLE = config.DEFAULT_STYLE 
    194196 
     
    225227        CHILD_FRAME = wx.Frame 
    226228 
     229#Initiliaze enviromental variable with custom setting but only if variable not set 
     230if SAS_OPENCL and not "SAS_OPENCL" in os.environ: 
     231    os.environ["SAS_OPENCL"] = SAS_OPENCL 
    227232 
    228233class ViewerFrame(PARENT_FRAME): 
  • src/sas/sasgui/guiframe/startup_configuration.py

    rd85c194 r62243ae  
    3131                   'CLEANUP_PLOT':False, 
    3232                   'DEFAULT_PERSPECTIVE':'Fitting', 
    33                    'DEFAULT_OPEN_FOLDER': None} 
     33                   'DEFAULT_OPEN_FOLDER': None, 
     34                   'SAS_OPENCL': None} 
    3435try: 
    3536    CURRENT_STRINGS = {'GUIFRAME_WIDTH':CURRENT.GUIFRAME_WIDTH, 
     
    4546                       'CLEANUP_PLOT':CURRENT.CLEANUP_PLOT, 
    4647                       'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE, 
    47                        'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER} 
     48                       'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER, 
     49                       'SAS_OPENCL': None} 
    4850except: 
    4951    CURRENT_STRINGS = DEFAULT_STRINGS 
  • src/sas/sasgui/perspectives/fitting/fitting.py

    r1a5d5f2 r8f02f7f  
    4545from sas.sasgui.guiframe.gui_manager import MDIFrame 
    4646from sas.sasgui.guiframe.documentation_window import DocumentationWindow 
     47from sas.sasgui.perspectives.fitting.gpu_options import GpuOptions 
    4748 
    4849from . import models 
     
    192193        self.bumps_options_menu = self.menu1.FindItemById(self.id_bumps_options) 
    193194        self.bumps_options_menu.Enable(True) 
     195 
     196        self.id_gpu_options_panel = wx.NewId() 
     197        self.menu1.Append(self.id_gpu_options_panel, "OpenCL Options", "Choose OpenCL driver or turn it off") 
     198        wx.EVT_MENU(owner, self.id_gpu_options_panel, self.on_gpu_options) 
    194199 
    195200        self.id_result_panel = wx.NewId() 
     
    801806        self.result_frame.Show() 
    802807        self.result_frame.Raise() 
     808 
     809    def on_gpu_options(self, event=None): 
     810        """ 
     811        Make the Fit Results panel visible. 
     812        """ 
     813        dialog = GpuOptions(None, wx.ID_ANY, "") 
     814        dialog.Show() 
    803815 
    804816    def stop_fit(self, uid): 
Note: See TracChangeset for help on using the changeset viewer.