File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -498,7 +498,6 @@ class Eddy(FSLCommand):
498
498
>>> res = eddy.run() # doctest: +SKIP
499
499
500
500
"""
501
- _cmd = 'eddy_openmp'
502
501
input_spec = EddyInputSpec
503
502
output_spec = EddyOutputSpec
504
503
@@ -507,8 +506,6 @@ class Eddy(FSLCommand):
507
506
def __init__ (self , ** inputs ):
508
507
super (Eddy , self ).__init__ (** inputs )
509
508
self .inputs .on_trait_change (self ._num_threads_update , 'num_threads' )
510
- if isdefined (self .inputs .use_cuda ):
511
- self ._use_cuda ()
512
509
if not isdefined (self .inputs .num_threads ):
513
510
self .inputs .num_threads = self ._num_threads
514
511
else :
@@ -523,11 +520,10 @@ def _num_threads_update(self):
523
520
self .inputs .environ ['OMP_NUM_THREADS' ] = str (
524
521
self .inputs .num_threads )
525
522
526
- def _use_cuda (self ):
527
- if self .inputs .use_cuda :
528
- self ._cmd = 'eddy_cuda'
529
- else :
530
- self ._cmd = 'eddy_openmp'
523
+ @property
524
+ def _cmd (self ):
525
+ cuda = self .inputs .use_cuda
526
+ return 'eddy_cuda' if isdefined (cuda ) and cuda else 'eddy_openmp'
531
527
532
528
def _format_arg (self , name , spec , value ):
533
529
if name == 'in_topup_fieldcoef' :
You can’t perform that action at this time.
0 commit comments