Skip to content

Commit 8a78efd

Browse files
committed
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
1 parent f3585d6 commit 8a78efd

17 files changed

Lines changed: 88 additions & 74 deletions

stan/math/opencl/kernel_cl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ inline tbb::concurrent_vector<cl::Event> select_events(K& m) {
133133
* @param sources A std::vector of strings containing the code for the kernel.
134134
* @param options The values of macros to be passed at compile time.
135135
*/
136-
inline auto compile_kernel(const char* name,
137-
const std::vector<std::string>& sources,
138-
const std::unordered_map<std::string, int>& options) {
136+
inline auto compile_kernel(
137+
const char* name, const std::vector<std::string>& sources,
138+
const std::unordered_map<std::string, int>& options) {
139139
auto base_opts = opencl_context.base_opts();
140140
for (auto& it : options) {
141141
if (base_opts[it.first] > it.second) {

stan/math/opencl/kernel_generator/append.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ class append_row_ : public operation_cl<append_row_<T_a, T_b>,
129129
* @param[in,out] arg_num consecutive number of the first argument to set.
130130
* This is incremented for each argument set by this function.
131131
*/
132-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
133-
std::unordered_map<const void*, const char*>& generated_all,
134-
cl::Kernel& kernel, int& arg_num) const {
132+
inline void set_args(
133+
std::unordered_map<const void*, const char*>& generated,
134+
std::unordered_map<const void*, const char*>& generated_all,
135+
cl::Kernel& kernel, int& arg_num) const {
135136
if (generated.count(this) == 0) {
136137
generated[this] = "";
137138
this->template get_arg<0>().set_args(generated, generated_all, kernel,
@@ -291,9 +292,10 @@ class append_col_ : public operation_cl<append_col_<T_a, T_b>,
291292
* @param[in,out] arg_num consecutive number of the first argument to set.
292293
* This is incremented for each argument set by this function.
293294
*/
294-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
295-
std::unordered_map<const void*, const char*>& generated_all,
296-
cl::Kernel& kernel, int& arg_num) const {
295+
inline void set_args(
296+
std::unordered_map<const void*, const char*>& generated,
297+
std::unordered_map<const void*, const char*>& generated_all,
298+
cl::Kernel& kernel, int& arg_num) const {
297299
if (generated.count(this) == 0) {
298300
generated[this] = "";
299301
this->template get_arg<0>().set_args(generated, generated_all, kernel,

stan/math/opencl/kernel_generator/as_column_vector_or_scalar.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ class as_column_vector_or_scalar_
185185
* @param[in,out] arg_num consecutive number of the first argument to set.
186186
* This is incremented for each argument set by this function.
187187
*/
188-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
189-
std::unordered_map<const void*, const char*>& generated_all,
190-
cl::Kernel& kernel, int& arg_num) const {
188+
inline void set_args(
189+
std::unordered_map<const void*, const char*>& generated,
190+
std::unordered_map<const void*, const char*>& generated_all,
191+
cl::Kernel& kernel, int& arg_num) const {
191192
if (generated.count(this) == 0) {
192193
generated[this] = "";
193194
std::unordered_map<const void*, const char*> generated2;

stan/math/opencl/kernel_generator/block_zero_based.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,10 @@ class block_
226226
* @param[in,out] arg_num consecutive number of the first argument to set.
227227
* This is incremented for each argument set by this function.
228228
*/
229-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
230-
std::unordered_map<const void*, const char*>& generated_all,
231-
cl::Kernel& kernel, int& arg_num) const {
229+
inline void set_args(
230+
std::unordered_map<const void*, const char*>& generated,
231+
std::unordered_map<const void*, const char*>& generated_all,
232+
cl::Kernel& kernel, int& arg_num) const {
232233
if (generated.count(this) == 0) {
233234
generated[this] = "";
234235
std::unordered_map<const void*, const char*> generated2;

stan/math/opencl/kernel_generator/calc_if.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ class calc_if_
6767
template <typename T_result>
6868
kernel_parts get_whole_kernel_parts(
6969
std::unordered_map<const void*, const char*>& generated,
70-
std::unordered_map<const void*, const char*>& generated_all, name_generator& ng,
71-
const std::string& row_index_name, const std::string& col_index_name,
72-
const T_result& result) const {
70+
std::unordered_map<const void*, const char*>& generated_all,
71+
name_generator& ng, const std::string& row_index_name,
72+
const std::string& col_index_name, const T_result& result) const {
7373
if (Do_Calculate) {
7474
return this->template get_arg<0>().get_whole_kernel_parts(
7575
generated, generated_all, ng, row_index_name, col_index_name, result);
@@ -88,9 +88,10 @@ class calc_if_
8888
* @param[in,out] arg_num consecutive number of the first argument to set.
8989
* This is incremented for each argument set by this function.
9090
*/
91-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
92-
std::unordered_map<const void*, const char*>& generated_all,
93-
cl::Kernel& kernel, int& arg_num) const {
91+
inline void set_args(
92+
std::unordered_map<const void*, const char*>& generated,
93+
std::unordered_map<const void*, const char*>& generated_all,
94+
cl::Kernel& kernel, int& arg_num) const {
9495
if (Do_Calculate) {
9596
this->template get_arg<0>().set_args(generated, generated_all, kernel,
9697
arg_num);

stan/math/opencl/kernel_generator/check_cl.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ class check_cl_ : public operation_cl_lhs<check_cl_<T>, bool> {
110110
* @param[in,out] arg_num consecutive number of the first argument to set.
111111
* This is incremented for each argument set by this function.
112112
*/
113-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
114-
std::unordered_map<const void*, const char*>& generated_all,
115-
cl::Kernel& kernel, int& arg_num) const {
113+
inline void set_args(
114+
std::unordered_map<const void*, const char*>& generated,
115+
std::unordered_map<const void*, const char*>& generated_all,
116+
cl::Kernel& kernel, int& arg_num) const {
116117
generated[this] = "";
117118
arg_.set_args(generated, generated_all, kernel, arg_num);
118119
kernel.setArg(arg_num++, buffer_.buffer());

stan/math/opencl/kernel_generator/colwise_reduction.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ class colwise_reduction
9797
template <typename T_result>
9898
kernel_parts get_whole_kernel_parts(
9999
std::unordered_map<const void*, const char*>& generated,
100-
std::unordered_map<const void*, const char*>& generated_all, name_generator& ng,
101-
const std::string& row_index_name, const std::string& col_index_name,
102-
const T_result& result) const {
100+
std::unordered_map<const void*, const char*>& generated_all,
101+
name_generator& ng, const std::string& row_index_name,
102+
const std::string& col_index_name, const T_result& result) const {
103103
kernel_parts parts = derived().get_kernel_parts(
104104
generated, generated_all, ng, row_index_name, col_index_name, false);
105105
kernel_parts out_parts = result.get_kernel_parts_lhs(

stan/math/opencl/kernel_generator/constant.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ class constant_ : public operation_cl<constant_<T>, T> {
8080
* @param[in,out] arg_num consecutive number of the first argument to set.
8181
* This is incremented for each argument set by this function.
8282
*/
83-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
84-
std::unordered_map<const void*, const char*>& generated_all,
85-
cl::Kernel& kernel, int& arg_num) const {
83+
inline void set_args(
84+
std::unordered_map<const void*, const char*>& generated,
85+
std::unordered_map<const void*, const char*>& generated_all,
86+
cl::Kernel& kernel, int& arg_num) const {
8687
if (generated.count(this) == 0) {
8788
generated[this] = "";
8889
kernel.setArg(arg_num++, a_);

stan/math/opencl/kernel_generator/indexing.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ class indexing_
171171
* @param[in,out] arg_num consecutive number of the first argument to set.
172172
* This is incremented for each argument set by this function.
173173
*/
174-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
175-
std::unordered_map<const void*, const char*>& generated_all,
176-
cl::Kernel& kernel, int& arg_num) const {
174+
inline void set_args(
175+
std::unordered_map<const void*, const char*>& generated,
176+
std::unordered_map<const void*, const char*>& generated_all,
177+
cl::Kernel& kernel, int& arg_num) const {
177178
if (generated.count(this) == 0) {
178179
generated[this] = "";
179180
this->template get_arg<1>().set_args(generated, generated_all, kernel,

stan/math/opencl/kernel_generator/load.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,10 @@ class load_
184184
* @param[in,out] arg_num consecutive number of the first argument to set.
185185
* This is incremented for each argument set by this function.
186186
*/
187-
inline void set_args(std::unordered_map<const void*, const char*>& generated,
188-
std::unordered_map<const void*, const char*>& generated_all,
189-
cl::Kernel& kernel, int& arg_num) const {
187+
inline void set_args(
188+
std::unordered_map<const void*, const char*>& generated,
189+
std::unordered_map<const void*, const char*>& generated_all,
190+
cl::Kernel& kernel, int& arg_num) const {
190191
if (generated_all.count(&a_) == 0) {
191192
generated_all[&a_] = "";
192193
kernel.setArg(arg_num++, a_.buffer());
@@ -315,9 +316,9 @@ class load_
315316
* @param[in,out] id_map map from memory addresses to unique ids
316317
* @param[in,out] next_id neqt unique id to use
317318
*/
318-
inline void get_unique_matrix_accesses(std::vector<int>& uids,
319-
std::unordered_map<const void*, int>& id_map,
320-
int& next_id) const {
319+
inline void get_unique_matrix_accesses(
320+
std::vector<int>& uids, std::unordered_map<const void*, int>& id_map,
321+
int& next_id) const {
321322
if (id_map.count(&a_) == 0) {
322323
id_map[&a_] = next_id;
323324
uids.push_back(next_id);

0 commit comments

Comments
 (0)