Skip to content

Commit 30cbdf7

Browse files
committed
remove stuff from arena_allocator and use ref_type_t in bad expr test
1 parent da09a5b commit 30cbdf7

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

stan/math/rev/core/arena_allocator.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ namespace math {
1313
template <typename T>
1414
struct arena_allocator {
1515
using value_type = T;
16-
using pointer = T*;
17-
using const_pointer = const T*;
18-
using reference = T&;
19-
using const_reference = const T&;
20-
using size_type = size_t;
21-
using difference_type = ptrdiff_t;
22-
using propagate_on_container_move_assignment = std::true_type;
2316

2417
/**
2518
* Allocates space for `n` items of type `T`.
@@ -30,13 +23,6 @@ struct arena_allocator {
3023
T* allocate(std::size_t n) {
3124
return ChainableStack::instance_->memalloc_.alloc_array<T>(n);
3225
}
33-
/**
34-
* Returns the maximum theoretically possible value of n,
35-
* for which the call allocate(n, 0) could succeed.
36-
*/
37-
static constexpr size_type max_size() noexcept {
38-
return std::numeric_limits<size_type>::max() / sizeof(T);
39-
}
4026

4127
/**
4228
* No-op. Memory is deallocated by calling `recover_memory()`.

test/expressions/expression_test_helpers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ auto bad_wrong_value(const T& a) {
282282

283283
template <typename T>
284284
auto bad_wrong_derivatives(const T& a) {
285-
operands_and_partials<plain_type_t<T>> ops(a);
285+
operands_and_partials<ref_type_t<T>> ops(a);
286286
if (!is_constant<T>::value && std::is_same<T, plain_type_t<T>>::value) {
287287
ops.edge1_.partials_[0] = 1234;
288288
}

0 commit comments

Comments
 (0)