Révision 190 Pi/XPU/PiXpuThreads.py
PiXpuThreads.py (revision 190) | ||
---|---|---|
78 | 78 |
RNG='MWC' |
79 | 79 |
# Value type : INT32, INT64, FP32, FP64 |
80 | 80 |
ValueType='FP32' |
81 |
# Inside based on If |
|
82 |
IfThen=False |
|
81 | 83 |
|
82 |
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>' |
|
84 |
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>'
|
|
83 | 85 |
|
84 | 86 |
try: |
85 |
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="]) |
|
87 |
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="])
|
|
86 | 88 |
except getopt.GetoptError: |
87 | 89 |
print(HowToUse % sys.argv[0]) |
88 | 90 |
sys.exit(2) |
... | ... | |
127 | 129 |
|
128 | 130 |
elif opt == '-c': |
129 | 131 |
Curves=True |
132 |
elif opt == '-k': |
|
133 |
IfThen=True |
|
130 | 134 |
elif opt in ("-d", "--device"): |
131 | 135 |
Devices.append(int(arg)) |
132 | 136 |
elif opt in ("-g", "--gpustyle"): |
... | ... | |
243 | 247 |
InputCL['Device']=Device |
244 | 248 |
InputCL['RNG']=RNG |
245 | 249 |
InputCL['ValueType']=ValueType |
250 |
InputCL['IfThen']=IfThen |
|
246 | 251 |
if GpuStyle=='CUDA': |
247 | 252 |
try: |
248 | 253 |
MyThread=threadWithReturn(target=MetropolisCuda, args=(InputCL,)) |
Formats disponibles : Unified diff