Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
e23e8af8
Commit
e23e8af8
authored
Mar 03, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build when with logging enabled
parent
2ba524c8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
libcaf_opencl/caf/opencl/actor_facade.hpp
libcaf_opencl/caf/opencl/actor_facade.hpp
+2
-2
libcaf_opencl/src/opencl_err.cpp
libcaf_opencl/src/opencl_err.cpp
+1
-2
libcaf_opencl/src/program.cpp
libcaf_opencl/src/program.cpp
+1
-1
libcaf_opencl/unit_testing/test_opencl.cpp
libcaf_opencl/unit_testing/test_opencl.cpp
+2
-2
No files found.
libcaf_opencl/caf/opencl/actor_facade.hpp
View file @
e23e8af8
...
@@ -70,7 +70,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
...
@@ -70,7 +70,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
result_mapping
map_result
=
result_mapping
{})
{
result_mapping
map_result
=
result_mapping
{})
{
if
(
global_dims
.
empty
())
{
if
(
global_dims
.
empty
())
{
auto
str
=
"OpenCL kernel needs at least 1 global dimension."
;
auto
str
=
"OpenCL kernel needs at least 1 global dimension."
;
CAF_LOG
M_ERROR
(
"caf::opencl::actor_facade"
,
str
);
CAF_LOG
F_ERROR
(
str
);
throw
std
::
runtime_error
(
str
);
throw
std
::
runtime_error
(
str
);
}
}
auto
check_vec
=
[
&
](
const
dim_vec
&
vec
,
const
char
*
name
)
{
auto
check_vec
=
[
&
](
const
dim_vec
&
vec
,
const
char
*
name
)
{
...
@@ -78,7 +78,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
...
@@ -78,7 +78,7 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
std
::
ostringstream
oss
;
std
::
ostringstream
oss
;
oss
<<
name
<<
" vector is not empty, but "
oss
<<
name
<<
" vector is not empty, but "
<<
"its size differs from global dimensions vector's size"
;
<<
"its size differs from global dimensions vector's size"
;
CAF_LOG
M_ERROR
(
"caf::opencl::actor_facade"
,
oss
.
str
());
CAF_LOG
F_ERROR
(
oss
.
str
());
throw
std
::
runtime_error
(
oss
.
str
());
throw
std
::
runtime_error
(
oss
.
str
());
}
}
};
};
...
...
libcaf_opencl/src/opencl_err.cpp
View file @
e23e8af8
...
@@ -33,8 +33,7 @@ void throwcl(const char* fname, cl_int err) {
...
@@ -33,8 +33,7 @@ void throwcl(const char* fname, cl_int err) {
}
}
void
pfn_notify
(
const
char
*
errinfo
,
const
void
*
,
size_t
,
void
*
)
{
void
pfn_notify
(
const
char
*
errinfo
,
const
void
*
,
size_t
,
void
*
)
{
CAF_LOGC_ERROR
(
"caf::opencl::opencl_metainfo"
,
"initialize"
,
CAF_LOGF_ERROR
(
"
\n
##### Error message via pfn_notify #####
\n
"
"
\n
##### Error message via pfn_notify #####
\n
"
<<
errinfo
<<
<<
errinfo
<<
"
\n
########################################"
);
"
\n
########################################"
);
}
}
...
...
libcaf_opencl/src/program.cpp
View file @
e23e8af8
...
@@ -49,7 +49,7 @@ program program::create(const char* kernel_source, const char* options,
...
@@ -49,7 +49,7 @@ program program::create(const char* kernel_source, const char* options,
oss
<<
"Device id "
<<
device_id
oss
<<
"Device id "
<<
device_id
<<
" is not a vaild device. Maximum id is: "
<<
(
devices
.
size
()
-
1
)
<<
" is not a vaild device. Maximum id is: "
<<
(
devices
.
size
()
-
1
)
<<
"."
;
<<
"."
;
CAF_LOG
M_ERROR
(
"caf::opencl::program"
,
oss
.
str
());
CAF_LOG
F_ERROR
(
oss
.
str
());
throw
runtime_error
(
oss
.
str
());
throw
runtime_error
(
oss
.
str
());
}
}
// create program object from kernel source
// create program object from kernel source
...
...
libcaf_opencl/unit_testing/test_opencl.cpp
View file @
e23e8af8
...
@@ -15,7 +15,6 @@ using namespace caf::opencl;
...
@@ -15,7 +15,6 @@ using namespace caf::opencl;
namespace
{
namespace
{
using
ivec
=
std
::
vector
<
int
>
;
using
ivec
=
std
::
vector
<
int
>
;
using
fvec
=
std
::
vector
<
float
>
;
constexpr
size_t
matrix_size
=
4
;
constexpr
size_t
matrix_size
=
4
;
constexpr
size_t
array_size
=
32
;
constexpr
size_t
array_size
=
32
;
...
@@ -166,7 +165,6 @@ square_matrix<Size> make_iota_matrix() {
...
@@ -166,7 +165,6 @@ square_matrix<Size> make_iota_matrix() {
return
result
;
return
result
;
}
}
template
<
size_t
Size
>
template
<
size_t
Size
>
bool
operator
==
(
const
square_matrix
<
Size
>&
lhs
,
bool
operator
==
(
const
square_matrix
<
Size
>&
lhs
,
const
square_matrix
<
Size
>&
rhs
)
{
const
square_matrix
<
Size
>&
rhs
)
{
...
@@ -298,6 +296,8 @@ void test_opencl() {
...
@@ -298,6 +296,8 @@ void test_opencl() {
int
main
()
{
int
main
()
{
CAF_TEST
(
test_opencl
);
CAF_TEST
(
test_opencl
);
announce
<
ivec
>
(
"ivec"
);
matrix_type
::
announce
();
test_opencl
();
test_opencl
();
await_all_actors_done
();
await_all_actors_done
();
shutdown
();
shutdown
();
...
...
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