linux compilation bugfix
parent
b445ecb2b0
commit
edb1869cd4
|
@ -75,7 +75,6 @@ also include the position of the character in both the work units and the work r
|
||||||
|
|
||||||
All of the relevant interfaces are contained in \code{include/mitsuba/core/sched.h}.
|
All of the relevant interfaces are contained in \code{include/mitsuba/core/sched.h}.
|
||||||
For reference, here are the interfaces of \code{WorkUnit} and \code{WorkResult}:
|
For reference, here are the interfaces of \code{WorkUnit} and \code{WorkResult}:
|
||||||
\newpage
|
|
||||||
\begin{cpp}
|
\begin{cpp}
|
||||||
/**
|
/**
|
||||||
* Abstract work unit. Represents a small amount of information
|
* Abstract work unit. Represents a small amount of information
|
||||||
|
@ -121,7 +120,6 @@ protected:
|
||||||
virtual ~WorkResult() { }
|
virtual ~WorkResult() { }
|
||||||
};
|
};
|
||||||
\end{cpp}
|
\end{cpp}
|
||||||
\newpage
|
|
||||||
In our case, the \code{WorkUnit} implementation then looks like this:
|
In our case, the \code{WorkUnit} implementation then looks like this:
|
||||||
\begin{cpp}
|
\begin{cpp}
|
||||||
class ROT13WorkUnit : public WorkUnit {
|
class ROT13WorkUnit : public WorkUnit {
|
||||||
|
@ -303,8 +301,8 @@ from the main utility function (the `Hello World' code we wrote earlier). We can
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
\end{cpp}
|
\end{cpp}
|
||||||
After compiling everything using \code{scons}, an exemplary usage
|
After compiling everything using \code{scons}, an simple example
|
||||||
would be to encode a string (e.g. \code{SECUREBYDESIGN}), while
|
involving the utility would be to encode a string (e.g. \code{SECUREBYDESIGN}), while
|
||||||
forwarding all computation to a network machine. (\code{-p0} disables
|
forwarding all computation to a network machine. (\code{-p0} disables
|
||||||
all local worker threads). Adding a verbose flag (\code{-v}) shows
|
all local worker threads). Adding a verbose flag (\code{-v}) shows
|
||||||
some additional scheduling information:
|
some additional scheduling information:
|
||||||
|
@ -328,5 +326,3 @@ Result: FRPHEROLQRFVTA
|
||||||
2010-08-17 01:35:46 DEBUG main [RemoteWorker] Shutting down
|
2010-08-17 01:35:46 DEBUG main [RemoteWorker] Shutting down
|
||||||
2010-08-17 01:35:46 DEBUG net0_r[Thread] Thread "net0_r" has finished
|
2010-08-17 01:35:46 DEBUG net0_r[Thread] Thread "net0_r" has finished
|
||||||
\end{shell}
|
\end{shell}
|
||||||
\subsection{Global Resources}
|
|
||||||
TBD.
|
|
||||||
|
|
|
@ -325,7 +325,10 @@ void Thread::initializeOpenMP(size_t threadCount) {
|
||||||
ref<Logger> logger = Thread::getThread()->getLogger();
|
ref<Logger> logger = Thread::getThread()->getLogger();
|
||||||
ref<FileResolver> fResolver = Thread::getThread()->getFileResolver();
|
ref<FileResolver> fResolver = Thread::getThread()->getFileResolver();
|
||||||
|
|
||||||
|
#if defined(__OSX__)
|
||||||
__threadCount = (int) threadCount;
|
__threadCount = (int) threadCount;
|
||||||
|
#endif
|
||||||
|
|
||||||
omp_set_num_threads((int) threadCount);
|
omp_set_num_threads((int) threadCount);
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
|
|
||||||
|
@ -339,7 +342,7 @@ void Thread::initializeOpenMP(size_t threadCount) {
|
||||||
#if MTS_BROKEN_OPENMP == 1
|
#if MTS_BROKEN_OPENMP == 1
|
||||||
__threadID.set(counter);
|
__threadID.set(counter);
|
||||||
#endif
|
#endif
|
||||||
counter = counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
thread->m_running = true;
|
thread->m_running = true;
|
||||||
thread->m_thread = pthread_self();
|
thread->m_thread = pthread_self();
|
||||||
|
|
|
@ -28,10 +28,10 @@ MTS_NAMESPACE_BEGIN
|
||||||
/*!\plugin{cylinder}{Cylinder intersection primitive}
|
/*!\plugin{cylinder}{Cylinder intersection primitive}
|
||||||
* \order{2}
|
* \order{2}
|
||||||
* \parameters{
|
* \parameters{
|
||||||
* \parameter{center}{\Point}{
|
* \parameter{a}{\Point}{
|
||||||
* Starting point of the cylinder's centerline \default{(0, 0, 0)}
|
* Starting point of the cylinder's centerline \default{(0, 0, 0)}
|
||||||
* }
|
* }
|
||||||
* \parameter{center}{\Point}{
|
* \parameter{b}{\Point}{
|
||||||
* Endpoint of the cylinder's centerline \default{(0, 0, 1)}
|
* Endpoint of the cylinder's centerline \default{(0, 0, 1)}
|
||||||
* }
|
* }
|
||||||
* \parameter{radius}{\Float}{
|
* \parameter{radius}{\Float}{
|
||||||
|
|
Loading…
Reference in New Issue