Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds require_* template type traits #1344

Merged
merged 74 commits into from
Oct 9, 2019
Merged
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
40335ed
Adds require_* template type traits
SteveBronder Sep 7, 2019
3cb3cfd
Run clang-format
SteveBronder Sep 7, 2019
0c9e8d9
cpplint fixes
SteveBronder Sep 7, 2019
c76fe5f
fixup is_var_or_arithmetic tests
SteveBronder Sep 7, 2019
242fdda
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Sep 7, 2019
9d95ef5
add is_vector_like header to require_generics header
SteveBronder Sep 7, 2019
790c0b9
Merge branch 'feature/require-templates' of github.com:stan-dev/math …
SteveBronder Sep 7, 2019
ce53688
move value_type from math namespace to stan namespace like the rest o…
SteveBronder Sep 7, 2019
ead4ff0
Show template style with add function
SteveBronder Sep 8, 2019
c804df3
[Jenkins] auto-formatting by clang-format version 5.0.2-svn328729-1~e…
stan-buildbot Sep 8, 2019
9f44861
Revert "[Jenkins] auto-formatting by clang-format version 5.0.2-svn32…
SteveBronder Sep 8, 2019
989b127
Revert "Show template style with add function"
SteveBronder Sep 8, 2019
ee140cb
merge to develop
SteveBronder Sep 10, 2019
40b27e4
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (ta…
stan-buildbot Sep 10, 2019
346d61b
fix scalar_type_pre
SteveBronder Sep 10, 2019
67a73f5
Merge branch 'feature/require-templates' of github.com:stan-dev/math …
SteveBronder Sep 10, 2019
ca57760
fix bad merge to origin
SteveBronder Sep 10, 2019
c8c698d
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Sep 10, 2019
cc7cc27
Have normal distribution functions in prim/scal use the requires and …
SteveBronder Sep 11, 2019
fc01589
Merge branch 'feature/require-templates' of github.com:stan-dev/math …
SteveBronder Sep 11, 2019
9bd747c
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Sep 11, 2019
5f08c37
fix cpplint
SteveBronder Sep 11, 2019
9888994
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Sep 11, 2019
fec06ac
Revert "fix cpplint"
SteveBronder Sep 11, 2019
8f9410b
Revert "[Jenkins] auto-formatting by clang-format version 6.0.0 (tags…
SteveBronder Sep 11, 2019
9053d80
Revert "Have normal distribution functions in prim/scal use the requi…
SteveBronder Sep 11, 2019
8ac529a
revert normal stuff until I fix operands_and_partials
SteveBronder Sep 11, 2019
cd3c7a8
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Sep 11, 2019
d825cc3
update to develop, change not_any/all to any/all_not, update the assi…
SteveBronder Sep 25, 2019
cad97d2
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Sep 25, 2019
8e0e903
fix cpplint whitespace
SteveBronder Sep 25, 2019
8581611
Merge branch 'feature/require-templates' of github.com:stan-dev/math …
SteveBronder Sep 25, 2019
16a9047
add back the explicit rvalue methods and constructors for matrix_cl
SteveBronder Sep 26, 2019
981b5aa
remove the .eval()s
SteveBronder Sep 26, 2019
7cb1f79
accidentally removed empty constructor
SteveBronder Sep 26, 2019
3601a64
add tests for matrix_cl assignment
SteveBronder Sep 27, 2019
d1896c9
forgot to also copy the read and write events in copy assignment
SteveBronder Sep 27, 2019
7a82301
Add back deep copy for ref assignment plus a test to make sure new me…
SteveBronder Sep 27, 2019
b34ac2c
Merge commit 'b6676952f244d6a6f90017af5b83221cd02988de' into HEAD
yashikno Sep 27, 2019
af4ee05
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (ta…
stan-buildbot Sep 27, 2019
80d0d18
Adds vt and st to the requires for container checks
SteveBronder Sep 27, 2019
c380d9d
Merge branch 'feature/require-templates' of github.com:stan-dev/math …
SteveBronder Sep 27, 2019
a01b150
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (ta…
stan-buildbot Sep 27, 2019
0dcd1d2
forgot a & when looking at read events
SteveBronder Sep 27, 2019
56a75a6
Merge remote-tracking branch 'origin/develop' into feature/require-te…
SteveBronder Sep 27, 2019
3d13a38
Merge remote-tracking branch 'origin/develop' into feature/require-te…
SteveBronder Oct 1, 2019
a057458
started cleaning up tests
SteveBronder Oct 1, 2019
946b095
Adds testing framework for require aliases
SteveBronder Oct 3, 2019
8e0ec57
merge to develop
SteveBronder Oct 3, 2019
9c610aa
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Oct 3, 2019
e6ca17d
use require instead of enable_if
SteveBronder Oct 3, 2019
a334b93
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Oct 3, 2019
481af84
forget to include vector in mat/meta/require tests
SteveBronder Oct 3, 2019
4e97c8f
rename all requires to use _t, _vt, or _st
SteveBronder Oct 3, 2019
88d9901
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (ta…
stan-buildbot Oct 3, 2019
934d530
forgot _t for require_same tests
SteveBronder Oct 3, 2019
3fc6b8f
fix fvar test
SteveBronder Oct 3, 2019
bd6379e
cleanup testing so we don't need one struct for ad_types and another …
SteveBronder Oct 3, 2019
906a24a
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (ta…
stan-buildbot Oct 3, 2019
5f22013
Merge remote-tracking branch 'origin/develop' into feature/require-te…
SteveBronder Oct 4, 2019
15ff684
change double with T in vector<eigen> matrix_cl constructor
SteveBronder Oct 4, 2019
408c1cd
[Jenkins] auto-formatting by clang-format version 5.0.2-svn328729-1~e…
stan-buildbot Oct 4, 2019
ed464f3
remove this->read_events() from constructors and add _st and _vt requ…
SteveBronder Oct 5, 2019
76dfde3
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Oct 5, 2019
a973fa7
Merge remote-tracking branch 'origin/develop' into feature/require-te…
SteveBronder Oct 7, 2019
b298924
add wait for write events when copying from matrix_cl
SteveBronder Oct 7, 2019
d2a8fa3
fix so that require_same is used to check the types match in matrix_c…
SteveBronder Oct 7, 2019
1eb2b75
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Oct 7, 2019
ef8ff87
add require for converting to string
SteveBronder Oct 8, 2019
9a5be1b
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (ta…
stan-buildbot Oct 8, 2019
a0eb72e
make a requires for checking if type T is convertible to S
SteveBronder Oct 8, 2019
b186221
make a requires for checking if type T is convertible to S
SteveBronder Oct 8, 2019
6992f07
[Jenkins] auto-formatting by clang-format version 5.0.0-3~16.04.1 (ta…
stan-buildbot Oct 8, 2019
5e73b0f
remove tbb stuff
SteveBronder Oct 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
…stable/2017-11-14)
  • Loading branch information
stan-buildbot committed Oct 7, 2019
commit 1eb2b759931233039224e07706343ca111399164
14 changes: 7 additions & 7 deletions stan/math/opencl/matrix_cl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,9 @@ class matrix_cl<T, require_arithmetic_t<T>> {
* is finished transfering
*/
cl::Event write_event;
queue.enqueueWriteBuffer(buffer_cl_, CL_FALSE,
sizeof(T) * offset_size,
sizeof(T) * rows_, A[i].data(),
nullptr, &write_event);
queue.enqueueWriteBuffer(buffer_cl_, CL_FALSE, sizeof(T) * offset_size,
sizeof(T) * rows_, A[i].data(), nullptr,
&write_event);
this->add_write_event(write_event);
}
} catch (const cl::Error& e) {
Expand Down Expand Up @@ -347,8 +346,8 @@ class matrix_cl<T, require_arithmetic_t<T>> {
try {
buffer_cl_ = cl::Buffer(ctx, CL_MEM_READ_WRITE, sizeof(T));
cl::Event transfer_event;
queue.enqueueWriteBuffer(buffer_cl_, CL_FALSE, 0, sizeof(T), &A,
nullptr, &transfer_event);
queue.enqueueWriteBuffer(buffer_cl_, CL_FALSE, 0, sizeof(T), &A, nullptr,
&transfer_event);
this->add_write_event(transfer_event);
} catch (const cl::Error& e) {
check_opencl_error("matrix constructor", e);
Expand All @@ -365,7 +364,8 @@ class matrix_cl<T, require_arithmetic_t<T>> {
* @throw <code>std::system_error</code> if the
* matrices do not have matching dimensions
*/
template <typename Vec, require_std_vector_t<Vec>..., require_same_vt<Vec, T>...>
template <typename Vec, require_std_vector_t<Vec>...,
require_same_vt<Vec, T>...>
explicit matrix_cl(Vec&& A, const int& R, const int& C,
matrix_cl_view partial_view = matrix_cl_view::Entire)
: rows_(R), cols_(C), view_(partial_view) {
Expand Down