提交 903403b2 编写于 作者: Y Yi Wang

Fix errors

上级 a2730d1e
...@@ -27,7 +27,7 @@ void MemoryBlock::init(MetadataCache* cache, Type t, size_t index, size_t size, ...@@ -27,7 +27,7 @@ void MemoryBlock::init(MetadataCache* cache, Type t, size_t index, size_t size,
static_cast<MemoryBlock*>(right_buddy))); static_cast<MemoryBlock*>(right_buddy)));
} }
MemoryBlock::Type MemoryBlock::type(MetadataCache& cache) const { MemoryBlock::Type MemoryBlock::type(const MetadataCache& cache) const {
return cache.load(this).type; return cache.load(this).type;
} }
......
...@@ -13,7 +13,8 @@ See the License for the specific language governing permissions and ...@@ -13,7 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include <cstddef> #include <cstdint>
#include <unordered_map>
namespace paddle { namespace paddle {
namespace memory { namespace memory {
...@@ -37,7 +38,7 @@ struct MemoryBlock { ...@@ -37,7 +38,7 @@ struct MemoryBlock {
// MemoryBlock::Desc to the beginning of the block; or, if it is a GPU memory // MemoryBlock::Desc to the beginning of the block; or, if it is a GPU memory
// block, the MetadataCache writes the Meatadata to a std::map in // block, the MetadataCache writes the Meatadata to a std::map in
// the CPU. // the CPU.
void init(MemoryBlock::DescCache* cache, Type t, size_t index, size_t size, void init(MetadataCache* cache, Type t, size_t index, size_t size,
void* left_buddy, void* right_buddy); void* left_buddy, void* right_buddy);
// All these accessors returns fields in the MemoryBlock::Desc of the memory // All these accessors returns fields in the MemoryBlock::Desc of the memory
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册