Provide definition and use SIZE_MAX for BFCAllocator::kInvalidChunkHandle
PiperOrigin-RevId: 324267861 Change-Id: I070baabf95939c60636d365d16ccc826175a76f5
This commit is contained in:
parent
a5795009f8
commit
8eccff2ea1
tensorflow/core/common_runtime
@ -36,6 +36,8 @@ limitations under the License.
|
||||
|
||||
namespace tensorflow {
|
||||
|
||||
constexpr BFCAllocator::ChunkHandle BFCAllocator::kInvalidChunkHandle;
|
||||
|
||||
BFCAllocator::BFCAllocator(SubAllocator* sub_allocator, size_t total_memory,
|
||||
bool allow_growth, const string& name,
|
||||
bool garbage_collection)
|
||||
|
@ -133,7 +133,7 @@ class BFCAllocator : public Allocator {
|
||||
// A ChunkHandle is an index into the chunks_ vector in BFCAllocator
|
||||
// kInvalidChunkHandle means an invalid chunk
|
||||
typedef size_t ChunkHandle;
|
||||
static constexpr ChunkHandle kInvalidChunkHandle = -1;
|
||||
static constexpr ChunkHandle kInvalidChunkHandle = SIZE_MAX;
|
||||
|
||||
typedef int BinNum;
|
||||
static constexpr int kInvalidBinNum = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user