Move constant definitions to header file.
MSVC cannot link some targets if inline functions refer to constants defined in a source file. PiperOrigin-RevId: 227054645
This commit is contained in:
parent
dc4058e246
commit
fbf52681e2
@ -118,9 +118,9 @@ OpKernel::OpKernel(OpKernelConstruction* context,
|
||||
|
||||
OpKernel::~OpKernel() {}
|
||||
|
||||
const uint64 OpKernel::kInitialCostEstimateCycles = 100 * 1000 * 1000;
|
||||
const uint64 OpKernel::kOpIsExpensiveThresholdCycles = 5000;
|
||||
const uint64 OpKernel::kCostDecay = 10;
|
||||
const uint64 OpKernel::kInitialCostEstimateCycles;
|
||||
const uint64 OpKernel::kOpIsExpensiveThresholdCycles;
|
||||
const uint64 OpKernel::kCostDecay;
|
||||
|
||||
const string& OpKernel::name() const { return def_->name(); }
|
||||
const string& OpKernel::type_string() const { return def_->op(); }
|
||||
|
@ -121,9 +121,9 @@ class OpKernel {
|
||||
// Initial time (in CPU cycles) we expect an operation to take. Used to
|
||||
// determine whether an operation should be place in a threadpool. Operations
|
||||
// start out "expensive".
|
||||
static const uint64 kInitialCostEstimateCycles;
|
||||
static const uint64 kOpIsExpensiveThresholdCycles;
|
||||
static const uint64 kCostDecay;
|
||||
static const uint64 kInitialCostEstimateCycles = 100 * 1000 * 1000;
|
||||
static const uint64 kOpIsExpensiveThresholdCycles = 5000;
|
||||
static const uint64 kCostDecay = 10;
|
||||
|
||||
// Returns true iff this op kernel is considered "expensive". The
|
||||
// runtime may use this flag to optimize graph execution for example
|
||||
|
Loading…
x
Reference in New Issue
Block a user