Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

neilisaac / torch   python

Repository URL to install this package:

Version: 1.8.0 

/ include / torch / csrc / jit / frontend / name_mangler.h

#pragma once

#include <ATen/core/qualified_name.h>
#include <torch/csrc/WindowsTorchApiMacro.h>

namespace torch {
namespace jit {

/**
 * class NameMangler
 *
 * Utility to mangle qualified names in order to make them unique. We use this
 * in various places where we to de-duplicate qualified names.
 */
class TORCH_API NameMangler {
 public:
  // Given a qualified name, return a mangled version that is guaranteed to be
  // unique with respect to previous/future calls of `mangled()` on this name
  // mangler instance.
  c10::QualifiedName mangle(const c10::QualifiedName& name);

 private:
  size_t mangleIndex_ = 0;
};

} // namespace jit
} // namespace torch