Skip to content

Commit 3d752fe

Browse files
Fixed bugs in core.Tensor (#31)
* Changed from `master` to `main` for Google test
1 parent 784da9e commit 3d752fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if(INSTALL_GOOGLETEST AND BUILD_TESTS)
2424
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
2525
ExternalProject_Add(googletest
2626
GIT_REPOSITORY https://github.com/google/googletest
27-
GIT_TAG master
27+
GIT_TAG main
2828
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
2929
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
3030
TEST_COMMAND "")

bnn/core/tensor_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ namespace bnn
9898
ndims_cpu(_ndims),
9999
shape_cpu(_init_shape_cpu(_shape, _ndims))
100100
{
101+
BNNMemory->push(this);
101102
}
102103

103104
template <class data_type>
@@ -184,7 +185,6 @@ namespace bnn
184185
reshape
185186
(vector<unsigned>& shape)
186187
{
187-
unsigned size = _calc_size(this->shape_cpu, this->ndims_cpu);
188188
unsigned* new_shape = new unsigned[shape.size()];
189189
copy(shape.begin(), shape.end(), new_shape);
190190
this->reshape(new_shape, shape.size());

0 commit comments

Comments
 (0)