20 #if !defined(__MITSUBA_RENDER_RANGE_H_)
21 #define __MITSUBA_RENDER_RANGE_H_
39 m_rangeStart = other->m_rangeStart;
40 m_rangeEnd = other->m_rangeEnd;
54 std::ostringstream oss;
55 oss <<
"RangeWorkUnit[rangeStart=" << m_rangeStart
56 <<
", rangeEnd=" << m_rangeEnd <<
"]";
60 inline void setRange(
size_t start,
size_t end) {
74 return m_rangeEnd - m_rangeStart + 1;
79 size_t m_rangeStart, m_rangeEnd;
A work unit specifying a range of some quantity to be processed.
Definition: range.h:35
void load(Stream *stream)
Fill the work unit with content acquired from a binary data stream.
Definition: range.h:43
size_t getRangeEnd() const
Definition: range.h:69
size_t getRangeStart() const
Definition: range.h:65
void set(const WorkUnit *wu)
Copy the content of another work unit of the same type.
Definition: range.h:37
Abstract work unit – represents a small amount of information that encodes part of a larger processin...
Definition: sched.h:47
Abstract seekable stream class.
Definition: stream.h:58
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
std::string toString() const
Return a string representation.
Definition: range.h:53
size_t getSize() const
Definition: range.h:73
void save(Stream *stream) const
Serialize a work unit to a binary data stream.
Definition: range.h:48
void writeSize(size_t value)
Write a size value to the stream.
Definition: stream.h:214
void setRange(size_t start, size_t end)
Definition: range.h:60
size_t readSize()
Read a size value from the stream.
Definition: stream.h:367