base.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* Copyright 2016 Google Inc. All Rights Reserved.
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. ==============================================================================*/
  12. #ifndef SYNTAXNET_BASE_H_
  13. #define SYNTAXNET_BASE_H_
  14. #include <map>
  15. #include <functional>
  16. #include <string>
  17. #include <unordered_map>
  18. #include <unordered_set>
  19. #include <vector>
  20. #ifdef INCLUDE_TENSORFLOW
  21. #include "google/protobuf/util/message_differencer.h"
  22. #include "tensorflow/core/lib/core/status.h"
  23. #include "tensorflow/core/lib/strings/strcat.h"
  24. #include "tensorflow/core/lib/strings/stringprintf.h"
  25. #include "tensorflow/core/platform/default/integral_types.h"
  26. #include "tensorflow/core/platform/mutex.h"
  27. #include "tensorflow/core/platform/protobuf.h"
  28. #endif
  29. using std::map;
  30. using std::pair;
  31. using std::unordered_map;
  32. using std::unordered_set;
  33. using std::vector;
  34. #ifdef INCLUDE_TENSORFLOW
  35. using tensorflow::int16;
  36. using tensorflow::int32;
  37. using tensorflow::int64;
  38. using tensorflow::int8;
  39. using tensorflow::mutex;
  40. using tensorflow::mutex_lock;
  41. using tensorflow::uint16;
  42. using tensorflow::uint32;
  43. using tensorflow::uint64;
  44. using tensorflow::uint8;
  45. using tensorflow::protobuf::TextFormat;
  46. #endif
  47. typedef signed int char32;
  48. using std::string;
  49. #ifdef INCLUDE_TENSORFLOW
  50. using tensorflow::StringPiece;
  51. #endif
  52. // namespace syntaxnet
  53. #endif // SYNTAXNET_BASE_H_