Skip to content

Commit

Permalink
Merge pull request halide#2196 from halide/srj-buf
Browse files Browse the repository at this point in the history
Buffer::copy and Buffer::make_with_shape_of need to forward optional …
  • Loading branch information
steven-johnson authored Jul 14, 2017
2 parents cf96af8 + 2e26ce7 commit 4ffac12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/HalideBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ class Buffer {
* original, with holes compacted away. */
Buffer<T, D> copy(void *(*allocate_fn)(size_t) = nullptr,
void (*deallocate_fn)(void *) = nullptr) const {
Buffer<T, D> dst = make_with_shape_of(*this);
Buffer<T, D> dst = make_with_shape_of(*this, allocate_fn, deallocate_fn);
dst.copy_from(*this);
return dst;
}
Expand Down Expand Up @@ -1420,7 +1420,7 @@ class Buffer {
}

Buffer<T, D> dst(nullptr, src.dimensions(), shape);
dst.allocate();
dst.allocate(allocate_fn, deallocate_fn);

return dst;
}
Expand Down

0 comments on commit 4ffac12

Please sign in to comment.