diff --git a/doc/parallelization.tex b/doc/parallelization.tex index 3498cbb3..87d37bc4 100644 --- a/doc/parallelization.tex +++ b/doc/parallelization.tex @@ -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}. For reference, here are the interfaces of \code{WorkUnit} and \code{WorkResult}: -\newpage \begin{cpp} /** * Abstract work unit. Represents a small amount of information @@ -121,7 +120,6 @@ protected: virtual ~WorkResult() { } }; \end{cpp} -\newpage In our case, the \code{WorkUnit} implementation then looks like this: \begin{cpp} class ROT13WorkUnit : public WorkUnit { @@ -303,8 +301,8 @@ from the main utility function (the `Hello World' code we wrote earlier). We can return 0; } \end{cpp} -After compiling everything using \code{scons}, an exemplary usage -would be to encode a string (e.g. \code{SECUREBYDESIGN}), while +After compiling everything using \code{scons}, an simple example +involving the utility would be to encode a string (e.g. \code{SECUREBYDESIGN}), while forwarding all computation to a network machine. (\code{-p0} disables all local worker threads). Adding a verbose flag (\code{-v}) shows 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 net0_r[Thread] Thread "net0_r" has finished \end{shell} -\subsection{Global Resources} -TBD. diff --git a/src/libcore/thread.cpp b/src/libcore/thread.cpp index cd68dd08..70459841 100644 --- a/src/libcore/thread.cpp +++ b/src/libcore/thread.cpp @@ -325,7 +325,10 @@ void Thread::initializeOpenMP(size_t threadCount) { ref logger = Thread::getThread()->getLogger(); ref fResolver = Thread::getThread()->getFileResolver(); +#if defined(__OSX__) __threadCount = (int) threadCount; +#endif + omp_set_num_threads((int) threadCount); int counter = 0; @@ -339,7 +342,7 @@ void Thread::initializeOpenMP(size_t threadCount) { #if MTS_BROKEN_OPENMP == 1 __threadID.set(counter); #endif - counter = counter++; + counter++; } thread->m_running = true; thread->m_thread = pthread_self(); diff --git a/src/shapes/cylinder.cpp b/src/shapes/cylinder.cpp index 3bd91565..d517ce26 100644 --- a/src/shapes/cylinder.cpp +++ b/src/shapes/cylinder.cpp @@ -28,10 +28,10 @@ MTS_NAMESPACE_BEGIN /*!\plugin{cylinder}{Cylinder intersection primitive} * \order{2} * \parameters{ - * \parameter{center}{\Point}{ + * \parameter{a}{\Point}{ * 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)} * } * \parameter{radius}{\Float}{