reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-10 c3765bd24fe73747688a0ec2a550f219c9acb384
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
 
// In order to preserve bc, we make DeprecatedTypeProperties instances unique
// just like they are for Type.
 
#include <c10/core/Backend.h>
#include <c10/core/ScalarType.h>
 
namespace at {
 
class DeprecatedTypeProperties;
 
struct CAFFE2_API DeprecatedTypePropertiesDeleter {
  void operator()(DeprecatedTypeProperties * ptr);
};
 
class CAFFE2_API DeprecatedTypePropertiesRegistry {
 public:
  DeprecatedTypePropertiesRegistry();
 
  DeprecatedTypeProperties& getDeprecatedTypeProperties(Backend p, ScalarType s, bool is_variable) const;
 
private:
  std::unique_ptr<DeprecatedTypeProperties> registry
    [static_cast<int>(Backend::NumOptions)]
    [static_cast<int>(ScalarType::NumOptions)]
    [2];  // is_variable
};
 
CAFFE2_API DeprecatedTypePropertiesRegistry& globalDeprecatedTypePropertiesRegistry();
 
} // namespace at