@@ -444,8 +444,7 @@ class EddyInputSpec(FSLCommandInputSpec):
444
444
desc = "Matrix that specifies the relative locations of "
445
445
"the field specified by --field and first volume "
446
446
"in file --imain" )
447
- use_gpu = traits .Str (desc = "Run eddy using gpu, possible values are "
448
- "[openmp] or [cuda]" )
447
+ use_cuda = traits .Bool (False , desc = "Run eddy using cuda gpu" )
449
448
450
449
451
450
class EddyOutputSpec (TraitedSpec ):
@@ -483,7 +482,7 @@ class Eddy(FSLCommand):
483
482
>>> res = eddy.run() # doctest: +SKIP
484
483
485
484
"""
486
- _cmd = 'eddy '
485
+ _cmd = 'eddy_openmp '
487
486
input_spec = EddyInputSpec
488
487
output_spec = EddyOutputSpec
489
488
@@ -492,8 +491,8 @@ class Eddy(FSLCommand):
492
491
def __init__ (self , ** inputs ):
493
492
super (Eddy , self ).__init__ (** inputs )
494
493
self .inputs .on_trait_change (self ._num_threads_update , 'num_threads' )
495
- if isdefined (self .inputs .use_gpu ):
496
- self ._use_gpu ()
494
+ if isdefined (self .inputs .use_cuda ):
495
+ self ._use_cuda ()
497
496
if not isdefined (self .inputs .num_threads ):
498
497
self .inputs .num_threads = self ._num_threads
499
498
else :
@@ -508,13 +507,11 @@ def _num_threads_update(self):
508
507
self .inputs .environ ['OMP_NUM_THREADS' ] = str (
509
508
self .inputs .num_threads )
510
509
511
- def _use_gpu (self ):
512
- if self .inputs .use_gpu . lower (). startswith ( 'cuda' ) :
510
+ def _use_cuda (self ):
511
+ if self .inputs .use_cuda :
513
512
_cmd = 'eddy_cuda'
514
- elif self .inputs .use_gpu .lower ().startswith ('openmp' ):
515
- _cmd = 'eddy_openmp'
516
513
else :
517
- _cmd = 'eddy '
514
+ _cmd = 'eddy_openmp '
518
515
519
516
def _format_arg (self , name , spec , value ):
520
517
if name == 'in_topup_fieldcoef' :
0 commit comments