Index: Pi/XPU/PiXpuThreads.py
===================================================================
--- Pi/XPU/PiXpuThreads.py	(revision 189)
+++ Pi/XPU/PiXpuThreads.py	(revision 190)
@@ -78,11 +78,13 @@
     RNG='MWC'
     # Value type : INT32, INT64, FP32, FP64
     ValueType='FP32'
+    # Inside based on If
+    IfThen=False
 
-    HowToUse='%s -c (Print Curves) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>'
+    HowToUse='%s -c (Print Curves) -k (Case On IfThen) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>'
     
     try:
-        opts, args = getopt.getopt(sys.argv[1:],"hcg:i:b:e:s:f:l:t:r:d:m:v:",["gpustyle=","iterations=","blocksBegin=","blocksEnd=","blocksStep=","threadsFirst=","threadsLast=","threadssTep=","redo=","device=","marsaglia=","valuetype="])
+        opts, args = getopt.getopt(sys.argv[1:],"hckg:i:b:e:s:f:l:t:r:d:m:v:",["gpustyle=","iterations=","blocksBegin=","blocksEnd=","blocksStep=","threadsFirst=","threadsLast=","threadssTep=","redo=","device=","marsaglia=","valuetype="])
     except getopt.GetoptError:
         print(HowToUse % sys.argv[0])
         sys.exit(2)
@@ -127,6 +129,8 @@
                 
         elif opt == '-c':
             Curves=True
+        elif opt == '-k':
+            IfThen=True
         elif opt in ("-d", "--device"):
             Devices.append(int(arg))
         elif opt in ("-g", "--gpustyle"):
@@ -243,6 +247,7 @@
                 InputCL['Device']=Device
                 InputCL['RNG']=RNG
                 InputCL['ValueType']=ValueType
+                InputCL['IfThen']=IfThen
                 if GpuStyle=='CUDA':
                     try:
                         MyThread=threadWithReturn(target=MetropolisCuda, args=(InputCL,))
Index: Pi/XPU/PiXpuMPI.py
===================================================================
--- Pi/XPU/PiXpuMPI.py	(revision 189)
+++ Pi/XPU/PiXpuMPI.py	(revision 190)
@@ -75,11 +75,13 @@
         RNG='MWC'
         # Value type : INT32, INT64, FP32, FP64
         ValueType='FP32'
-
-        HowToUse='%s -c (Print Curves) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>'
+        # Inside based on If
+        IfThen=False
+        
+        HowToUse='%s -c (Print Curves) -k (Case On IfThen) -d <DeviceId> -g <CUDA/OpenCL> -i <Iterations> -b <BlocksBegin> -e <BlocksEnd> -s <BlocksStep> -f <ThreadsFirst> -l <ThreadsLast> -t <ThreadssTep> -r <RedoToImproveStats> -m <SHR3/CONG/MWC/KISS> -v <INT32/INT64/FP32/FP64>'
     
         try:
-            opts, args = getopt.getopt(sys.argv[1:],"hcg:i:b:e:s:f:l:t:r:d:m:v:",["gpustyle=","iterations=","blocksBegin=","blocksEnd=","blocksStep=","threadsFirst=","threadsLast=","threadssTep=","redo=","device=","marsaglia=","valuetype="])
+            opts, args = getopt.getopt(sys.argv[1:],"hckg:i:b:e:s:f:l:t:r:d:m:v:",["gpustyle=","iterations=","blocksBegin=","blocksEnd=","blocksStep=","threadsFirst=","threadsLast=","threadssTep=","redo=","device=","marsaglia=","valuetype="])
         except getopt.GetoptError:
             print(HowToUse % sys.argv[0])
             sys.exit(2)
@@ -124,6 +126,8 @@
                     
             elif opt == '-c':
                 Curves=True
+            elif opt == '-k':
+                IfThen=True
             elif opt in ("-d", "--device"):
                 Devices.append(int(arg))
             elif opt in ("-g", "--gpustyle"):
@@ -240,6 +244,7 @@
                 InputCL['RNG']=RNG
                 InputCL['ValueType']=ValueType
                 InputCL['GpuStyle']=GpuStyle
+                InputCL['IfThen']=IfThen
 
                 for Device in Devices[1:]:
                     print("Send to device %i on rank %i" % (Device,r))
