Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Francesco Brarda
stan-math-petsc
Commits
8874151b
Commit
8874151b
authored
5 years ago
by
tadej
Browse files
Options
Download
Email Patches
Plain Diff
fixes according to review
parent
463720aa
stan-petsc
bugfix/issue-1250-lgamma
code-cleanup/chain-final
develop
feature/1258-ad-test-core
feature/issue-1115-newton_solver
feature/issue-989-rev-mat-eig
feature/lambertw
feature/python-test-math-dependencies
issue-static-init-order
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
stan/math/opencl/kernels/sub_block.hpp
+6
-6
stan/math/opencl/kernels/sub_block.hpp
stan/math/opencl/sub_block.hpp
+4
-4
stan/math/opencl/sub_block.hpp
with
10 additions
and
10 deletions
+10
-10
stan/math/opencl/kernels/sub_block.hpp
View file @
8874151b
...
...
@@ -47,13 +47,13 @@ static const char *sub_block_kernel_code = STRINGIFY(
unsigned
int
dst_offset_j
,
unsigned
int
size_i
,
unsigned
int
size_j
,
unsigned
int
src_rows
,
unsigned
int
src_cols
,
unsigned
int
dst_rows
,
unsigned
int
dst_cols
,
unsigned
int
partial_view
)
{
int
i
=
get_global_id
(
0
);
int
j
=
get_global_id
(
1
);
const
int
i
=
get_global_id
(
0
);
const
int
j
=
get_global_id
(
1
);
int
src_idx_i
=
i
+
src_offset_i
;
int
src_idx_j
=
j
+
src_offset_j
;
int
dst_idx_i
=
i
+
dst_offset_i
;
int
dst_idx_j
=
j
+
dst_offset_j
;
const
int
src_idx_i
=
i
+
src_offset_i
;
const
int
src_idx_j
=
j
+
src_offset_j
;
const
int
dst_idx_i
=
i
+
dst_offset_i
;
const
int
dst_idx_j
=
j
+
dst_offset_j
;
if
(
src_idx_i
<
src_rows
&&
src_idx_j
<
src_cols
&&
dst_idx_i
<
dst_rows
&&
dst_idx_j
<
dst_cols
)
{
...
...
This diff is collapsed.
Click to expand it.
stan/math/opencl/sub_block.hpp
View file @
8874151b
...
...
@@ -62,14 +62,14 @@ inline void matrix_cl<T, enable_if_arithmetic<T>>::sub_block(
this
->
rows
(),
this
->
cols
(),
A
.
partial_view
());
}
// calculation of extreme sub- and super- diagonal written
int
diag_in_copy
=
A_i
-
A_j
;
int
copy_low
=
is_not_diagonal
(
A
.
partial_view
(),
PartialViewCL
::
Lower
)
const
int
diag_in_copy
=
A_i
-
A_j
;
const
int
copy_low
=
is_not_diagonal
(
A
.
partial_view
(),
PartialViewCL
::
Lower
)
?
1
-
nrows
:
diag_in_copy
;
int
copy_high
=
is_not_diagonal
(
A
.
partial_view
(),
PartialViewCL
::
Upper
)
const
int
copy_high
=
is_not_diagonal
(
A
.
partial_view
(),
PartialViewCL
::
Upper
)
?
ncols
-
1
:
diag_in_copy
;
int
start
=
this_j
-
this_i
;
const
int
start
=
this_j
-
this_i
;
if
(
start
+
copy_low
<
0
)
{
this
->
partial_view_
=
this
->
partial_view_
+
PartialViewCL
::
Lower
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help