Skip to content

Commit

Permalink
MNN:Bugfix: Fix compile bug for no_error in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaying committed Sep 12, 2024
1 parent 7940973 commit c01ec71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 7 additions & 0 deletions source/core/BufferAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ void MemChunk::attach(Tensor* tensor) {
mNode->tensors.push_back(tensor);
}
}
ErrorCode BufferAllocator::compute() {
return NO_ERROR;
}
ErrorCode BufferAllocator::apply() {
return NO_ERROR;
}

class DefaultAllocator : public BufferAllocator::Allocator {
public:
DefaultAllocator() {
Expand Down
8 changes: 2 additions & 6 deletions source/core/BufferAllocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,8 @@ class MNN_PUBLIC BufferAllocator : public NonCopyable {
virtual void beginGroup() {}
virtual void endGroup() {}
virtual void reset() {}
virtual ErrorCode compute() {
return NO_ERROR;
}
virtual ErrorCode apply() {
return NO_ERROR;
}
virtual ErrorCode compute();
virtual ErrorCode apply();
protected:
size_t mTotalSize = 0;
};
Expand Down

0 comments on commit c01ec71

Please sign in to comment.