fea/docker_cudnn7
Yi Wang 8 years ago
parent a2730d1e0b
commit 903403b2e1

@ -27,7 +27,7 @@ void MemoryBlock::init(MetadataCache* cache, Type t, size_t index, size_t size,
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;
}

@ -13,7 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#include <cstddef>
#include <cstdint>
#include <unordered_map>
namespace paddle {
namespace memory {
@ -37,7 +38,7 @@ struct MemoryBlock {
// 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
// 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);
// All these accessors returns fields in the MemoryBlock::Desc of the memory

Loading…
Cancel
Save