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
4b97ce11
Commit
4b97ce11
authored
Mar 22, 2013
by
Joseph Noir
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/opencl' of github.com:Neverlord/libcppa into topic/opencl
parents
df081550
68b2861f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
65 deletions
+16
-65
CMakeLists.txt
CMakeLists.txt
+6
-4
FindPTHREAD.cmake
FindPTHREAD.cmake
+0
-56
cppa/opencl/command_dispatcher.hpp
cppa/opencl/command_dispatcher.hpp
+4
-3
src/logging.cpp
src/logging.cpp
+1
-1
src/opencl/command_dispatcher.cpp
src/opencl/command_dispatcher.cpp
+4
-0
src/thread_pool_scheduler.cpp
src/thread_pool_scheduler.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
4b97ce11
...
...
@@ -162,11 +162,13 @@ if (BOOST_ROOT)
set
(
Boost_NO_SYSTEM_PATHS true
)
endif
()
find_package
(
PTHREAD REQUIRED
)
set
(
INCLUDE_DIRS .
${
PTHREAD_INCLUDE_DIR
}
)
set
(
INCLUDE_DIRS .
)
set
(
LD_DIRS
)
set
(
LD_FLAGS
${
CMAKE_LD_LIBS
}
${
PTHREAD_LIBRARIES
}
)
set
(
LD_FLAGS
${
CMAKE_LD_LIBS
}
)
if
(
UNIX
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-pthread"
)
endif
(
UNIX
)
if
(
ENABLE_OPENCL
)
find_package
(
OPENCL REQUIRED
)
...
...
FindPTHREAD.cmake
deleted
100644 → 0
View file @
df081550
# - Find pthread
# Find the native PTHREAD headers and libraries.
#
# PTHREAD_INCLUDE_DIR - where to find pthread.h, etc.
# PTHREAD_LIBRARIES - List of libraries when using pthread.
# PTHREAD_FOUND - True if pthread found.
GET_FILENAME_COMPONENT
(
module_file_path
${
CMAKE_CURRENT_LIST_FILE
}
PATH
)
# Look for the header file.
FIND_PATH
(
PTHREAD_INCLUDE_DIR NAMES pthread.h
PATHS $ENV{H3D_EXTERNAL_ROOT}/include
$ENV{H3D_EXTERNAL_ROOT}/include/pthread
$ENV{H3D_ROOT}/../External/include
$ENV{H3D_ROOT}/../External/include/pthread
../../External/include
../../External/include/pthread
${
module_file_path
}
/../../../External/include
${
module_file_path
}
/../../../External/include/pthread
)
MARK_AS_ADVANCED
(
PTHREAD_INCLUDE_DIR
)
# Look for the library.
IF
(
WIN32
)
FIND_LIBRARY
(
PTHREAD_LIBRARY NAMES pthreadVC2
PATHS $ENV{H3D_EXTERNAL_ROOT}/lib
$ENV{H3D_ROOT}/../External/lib
../../External/lib
${
module_file_path
}
/../../../External/lib
)
ELSE
(
WIN32
)
FIND_LIBRARY
(
PTHREAD_LIBRARY NAMES pthread
)
ENDIF
(
WIN32
)
MARK_AS_ADVANCED
(
PTHREAD_LIBRARY
)
# Copy the results to the output variables.
IF
(
PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY
)
SET
(
PTHREAD_FOUND 1
)
SET
(
PTHREAD_LIBRARIES
${
PTHREAD_LIBRARY
}
)
SET
(
PTHREAD_INCLUDE_DIR
${
PTHREAD_INCLUDE_DIR
}
)
ELSE
(
PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY
)
SET
(
PTHREAD_FOUND 0
)
SET
(
PTHREAD_LIBRARIES
)
SET
(
PTHREAD_INCLUDE_DIR
)
ENDIF
(
PTHREAD_INCLUDE_DIR AND PTHREAD_LIBRARY
)
# Report the results.
IF
(
NOT PTHREAD_FOUND
)
SET
(
PTHREAD_DIR_MESSAGE
"PTHREAD was not found. Make sure PTHREAD_LIBRARY and PTHREAD_INCLUDE_DIR are set. Pthread is required to compile."
)
IF
(
PTHREAD_FIND_REQUIRED
)
MESSAGE
(
FATAL_ERROR
"
${
PTHREAD_DIR_MESSAGE
}
"
)
ELSEIF
(
NOT PTHREAD_FIND_QUIETLY
)
MESSAGE
(
STATUS
"
${
PTHREAD_DIR_MESSAGE
}
"
)
ENDIF
(
PTHREAD_FIND_REQUIRED
)
ENDIF
(
NOT PTHREAD_FOUND
)
cppa/opencl/command_dispatcher.hpp
View file @
4b97ce11
...
...
@@ -187,10 +187,11 @@ class command_dispatcher {
};
#else // CPPA_OPENCL
class
command_dispatcher
:
public
detail
::
singleton_mixin
<
command_dispatcher
>
{
};
class
command_dispatcher
:
public
detail
::
singleton_mixin
<
command_dispatcher
>
{
};
#endif // CPPA_OPENCL
command_dispatcher
*
get_command_dispatcher
();
}
}
// namespace cppa::opencl
#endif // CPPA_OPENCL_COMMAND_DISPATCHER_HPP
src/logging.cpp
View file @
4b97ce11
...
...
@@ -84,7 +84,7 @@ class logging_impl : public logging {
void
operator
()()
{
ostringstream
fname
;
fname
<<
"libcppa_"
<<
getpid
()
<<
"_"
<<
time
(
0
)
<<
".log"
;
fstream
out
(
fname
.
str
().
c_str
(),
ios
::
app
);
fstream
out
(
fname
.
str
().
c_str
(),
ios
::
out
);
unique_ptr
<
log_event
>
event
;
for
(;;)
{
event
.
reset
(
m_queue
.
pop
());
...
...
src/opencl/command_dispatcher.cpp
View file @
4b97ce11
...
...
@@ -264,4 +264,8 @@ void command_dispatcher::dispose() {
delete
this
;
}
command_dispatcher
*
get_command_dispatcher
()
{
return
detail
::
singleton_manager
::
get_command_dispatcher
();
}
}
}
// namespace cppa::opencl
src/thread_pool_scheduler.cpp
View file @
4b97ce11
...
...
@@ -133,7 +133,7 @@ void thread_pool_scheduler::worker_loop(thread_pool_scheduler::worker* w) {
}
thread_pool_scheduler
::
thread_pool_scheduler
()
{
m_num_threads
=
std
::
max
<
size_t
>
(
std
::
thread
::
hardware_concurrency
()
*
2
,
4
);
m_num_threads
=
std
::
max
<
size_t
>
(
std
::
thread
::
hardware_concurrency
(),
4
);
}
thread_pool_scheduler
::
thread_pool_scheduler
(
size_t
num_worker_threads
)
{
...
...
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