| 81 | return 1 |
| 82 | |
| 83 | def executable(library): |
| 84 | if type(library) != str: |
| 85 | print 'ERROR: expected library name to be a string' |
| 86 | quit() |
| 87 | |
| 88 | if sys.platform != 'win32' and sys.platform != 'linux2': |
| 89 | print 'ERROR: unknown operating system' |
| 90 | quit() |
| 91 | |
| 92 | if library == 'clFFT' or library == 'null': |
| 93 | if sys.platform == 'win32': |
| 94 | exe = 'clFFT-client.exe' |
| 95 | elif sys.platform == 'linux2': |
| 96 | exe = 'clFFT-client' |
| 97 | elif library == 'cuFFT': |
| 98 | if sys.platform == 'win32': |
| 99 | exe = 'cuFFT-client.exe' |
| 100 | elif sys.platform == 'linux2': |
| 101 | exe = 'cuFFT-client' |
| 102 | else: |
| 103 | print 'ERROR: unknown library -- cannot determine executable name' |
| 104 | quit() |
| 105 | |
| 106 | return exe |
| 107 | |
| 108 | def max_mem_available_in_bytes(exe, device): |
| 109 | arguments = [exe, '-i', device] |