def _get_header_version()

in gpu/find_cuda_config.py [0:0]


def _get_header_version(path, name):
  """Returns preprocessor defines in C header file."""
  for line in io.open(path, "r", encoding="utf-8").readlines():
    match = re.match("#define %s +(\d+)" % name, line)
    if match:
      return match.group(1)
  return ""