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
31cb96a4
Commit
31cb96a4
authored
6 years ago
by
rok-cesnovar
Browse files
Options
Download
Email Patches
Plain Diff
dst first in unpack
parent
207f403c
stan-petsc
bugfix/issue-1250-lgamma
bugfix/issue-1270-add-check-for-meta-includes
code-cleanup/chain-final
code-cleanup/issue-937-flatten
develop
feature/1258-ad-test-core
feature/concept-chainable-allocator
feature/eigen-aligned-malloc
feature/faster-ad-tls-v4
feature/faster-ad-tls-v4-windows
feature/faster-ad-tls-v6
feature/intel-tbb-lib
feature/issue-1115-newton_solver
feature/issue-1257-diff_algebra_solver
feature/issue-755-laplace
feature/issue-937-flatten-meta-again
feature/issue-937-flatten-meta-the-third
feature/issue-937-flatten-meta-third
feature/issue-989-rev-mat-eig
feature/lambertw
feature/python-test-math-dependencies
feature/sparse-cholesky
internal/no-assert
issue-static-init-order
master
parallel-ad-tape-3
release/v2.19.0
release/v2.19.1
release/v2.20.0
stancon/syclik
syclik/forward-mode
v2.20.0
v2.19.1
v2.19.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
stan/math/opencl/copy.hpp
+1
-1
stan/math/opencl/copy.hpp
stan/math/opencl/kernels/unpack.hpp
+2
-2
stan/math/opencl/kernels/unpack.hpp
with
3 additions
and
3 deletions
+3
-3
stan/math/opencl/copy.hpp
View file @
31cb96a4
...
...
@@ -146,7 +146,7 @@ inline void packed_copy(matrix_cl& dst, const std::vector<double>& src) {
queue
.
enqueueWriteBuffer
(
oclBuffer_packed
,
CL_TRUE
,
0
,
sizeof
(
double
)
*
packed_size
,
src
.
data
());
stan
::
math
::
opencl_kernels
::
unpack
(
cl
::
NDRange
(
dst
.
rows
(),
dst
.
rows
()),
oclBuffer_packed
,
dst
.
buffer
(),
cl
::
NDRange
(
dst
.
rows
(),
dst
.
rows
()),
dst
.
buffer
(),
oclBuffer_packed
,
dst
.
rows
(),
dst
.
rows
(),
triangular_view
);
}
catch
(
const
cl
::
Error
&
e
)
{
check_opencl_error
(
"packed_copy std::vector->OpenCL"
,
e
);
...
...
This diff is collapsed.
Click to expand it.
stan/math/opencl/kernels/unpack.hpp
View file @
31cb96a4
...
...
@@ -14,8 +14,8 @@ static const char* unpack_kernel_code = STRINGIFY(
* Unpacks a packed triangular matrix to a flat
* matrix
*
* @param[in] A packed buffer
* @param[out] B flat matrix
* @param[in] A packed buffer
* @param rows number of columns for matrix B
* @param cols number of columns for matrix B
* @param part parameter that defines the triangularity of the
...
...
@@ -27,7 +27,7 @@ static const char* unpack_kernel_code = STRINGIFY(
* <code>unpack_kernel_code.</code>
* This kernel uses the helper macros available in helpers.cl.
*/
__kernel
void
unpack
(
__global
double
*
A
,
__global
double
*
B
,
__kernel
void
unpack
(
__global
double
*
B
,
__global
double
*
A
,
unsigned
int
rows
,
unsigned
int
cols
,
unsigned
int
part
)
{
int
i
=
get_global_id
(
0
);
...
...
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