parameters: ()
return_statement: return (bin_path, lib_path + lib_ext, inc_path)
docstring: Determines CUDA {bin,lib,include} paths
  
      returns (bin_path,lib_path,inc_path)
docstring_summary: Determines CUDA {bin,lib,include} paths
docstring_tokens: Determines CUDA { bin lib include } paths
function: def get_cuda_paths():
      """Determines CUDA {bin,lib,include} paths
  
      returns (bin_path,lib_path,inc_path)
      """
  
      # determine defaults
      if os.name == 'nt':
          bin_path = 'C:/CUDA/bin'
          lib_path = 'C:/CUDA/lib'
          inc_path = 'C:/CUDA/include'
      elif os.name == 'posix':
          bin_path = '/usr/local/cuda/bin'
          lib_path = '/usr/local/cuda/lib'
          inc_path = '/usr/local/cuda/include'
      else:
          raise ValueError('Error: unknown OS {}.  Where is nvcc installed?'.format(os.name))
  
      lib_ext = ''
      if platform.machine()[-2:] == '64' and platform.platform()[:6] != 'Darwin':
          lib_ext = '64'
  
      # override with environement variables
      if 'CUDA_PATH' in os.environ:
  	    bin_path = os.path.abspath(os.environ['CUDA_PATH']) + os.sep + 'bin'
  	    lib_path = os.path.abspath(os.environ['CUDA_PATH']) + os.sep + 'lib'
  	    inc_path = os.path.abspath(os.environ['CUDA_PATH']) + os.sep + 'include'
      if 'CUDA_BIN_PATH' in os.environ:
          bin_path = os.path.abspath(os.environ['CUDA_BIN_PATH'])
      if 'CUDA_LIB_PATH' in os.environ:
          lib_path = os.path.abspath(os.environ['CUDA_LIB_PATH'])
      if 'CUDA_INC_PATH' in os.environ:
          inc_path = os.path.abspath(os.environ['CUDA_INC_PATH'])
  
      return (bin_path, lib_path + lib_ext, inc_path)
function_tokens: def get_cuda_paths ( ) : # determine defaults if os . name == 'nt' : bin_path = 'C:/CUDA/bin' lib_path = 'C:/CUDA/lib' inc_path = 'C:/CUDA/include' elif os . name == 'posix' : bin_path = '/usr/local/cuda/bin' lib_path = '/usr/local/cuda/lib' inc_path = '/usr/local/cuda/include' else : raise ValueError ( 'Error: unknown OS {}.  Where is nvcc installed?' . format ( os . name ) ) lib_ext = '' if platform . machine ( ) [ - 2 : ] == '64' and platform . platform ( ) [ : 6 ] != 'Darwin' : lib_ext = '64' # override with environement variables if 'CUDA_PATH' in os . environ : bin_path = os . path . abspath ( os . environ [ 'CUDA_PATH' ] ) + os . sep + 'bin' lib_path = os . path . abspath ( os . environ [ 'CUDA_PATH' ] ) + os . sep + 'lib' inc_path = os . path . abspath ( os . environ [ 'CUDA_PATH' ] ) + os . sep + 'include' if 'CUDA_BIN_PATH' in os . environ : bin_path = os . path . abspath ( os . environ [ 'CUDA_BIN_PATH' ] ) if 'CUDA_LIB_PATH' in os . environ : lib_path = os . path . abspath ( os . environ [ 'CUDA_LIB_PATH' ] ) if 'CUDA_INC_PATH' in os . environ : inc_path = os . path . abspath ( os . environ [ 'CUDA_INC_PATH' ] ) return ( bin_path , lib_path + lib_ext , inc_path )