docs: def find_cuda():
      '''Locate the CUDA environment on the system.'''
      # search the PATH for NVCC
      for fldr in os.environ['PATH'].split(os.pathsep):
          cuda_path = join(fldr, 'nvcc')
          if os.path.exists(cuda_path):
              cuda_path = os.path.dirname(os.path.dirname(cuda_path))
              break
          cuda_path = None
      
      if cuda_path is None:
          print 'w> nvcc compiler could not be found from the PATH!'
          return None
  
      # serach for the CUDA library path
      lcuda_path = os.path.join(cuda_path, 'lib64')
      if 'LD_LIBRARY_PATH' in os.environ.keys():
          if lcuda_path in os.environ['LD_LIBRARY_PATH'].split(os.pathsep):
              print 'i> found CUDA lib64 in LD_LIBRARY_PATH:   ', lcuda_path
      elif os.path.isdir(lcuda_path):
          print 'i> found CUDA lib64 in :   ', lcuda_path
      else:
          print 'w> folder for CUDA library (64-bit) could not be found!'
  
  
      return cuda_path, lcuda_path