Skip to content

Commit db91383

Browse files
author
Andre Zapico
committed
this is a bit faster may be? no copying and extra datatype
1 parent 0854076 commit db91383

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

stan/math/prim/fun/exp.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ class apply_exp {
7373
public:
7474
Container operator()(const tbb::blocked_range<std::size_t>& r) const {
7575
Container a = my_a;
76-
Container a_out = my_a;
76+
//Container a_out = my_a;
7777
for (std::size_t i = r.begin(); i != r.end(); ++i) {
78-
a_out[i] = std::exp(a[i]);
78+
my_a[i] = std::exp(a[i]);
7979
}
80-
return a_out;
80+
return my_a;
8181
}
8282
apply_exp<Container>(Container a) : my_a(a) {}
8383
};

0 commit comments

Comments
 (0)