Révision 130
| Pi/XPU/PiXPU.py (revision 130) | ||
|---|---|---|
| 897 | 897 |
except: |
| 898 | 898 |
print("Problem with (%i,%i) // computations on OpenCL" % (Blocks,Threads))
|
| 899 | 899 |
Rate=NewIterations/Duration |
| 900 |
print("Pi estimation %.8f" % (4./NewIterations*Inside))
|
|
| 901 |
|
|
| 900 | 902 |
|
| 901 | 903 |
avgD=numpy.append(avgD,numpy.average(Duration)) |
| 902 | 904 |
medD=numpy.append(medD,numpy.median(Duration)) |
| Pi/XPU/PiXpuThreads.py (revision 130) | ||
|---|---|---|
| 262 | 262 |
OutputCL=MyThread.join() |
| 263 | 263 |
NewIterations+=OutputCL['NewIterations'] |
| 264 | 264 |
Inside+=OutputCL['Inside'] |
| 265 |
print("Pi equals:",4./NewIterations*Inside)
|
|
| 265 |
print("Pi estimation %.8f" % (4./NewIterations*Inside))
|
|
| 266 | 266 |
|
| 267 | 267 |
Duration=numpy.append(Duration,time.time()-time_start) |
| 268 | 268 |
Rate=numpy.append(Rate,NewIterations/Duration[-1]) |
Formats disponibles : Unified diff