Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Reduce compile time by trimming template expansion in IBA #4476

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/include/OpenImageIO/imagebuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,30 @@ class OIIO_API ImageBuf {
m_nchannels);
}

/// Set the number of deep data samples at this pixel. (Only use
/// this if deep_alloc() has not yet been called on the buffer.)
void set_deep_samples(int n)
{
ensure_writable();
return const_cast<ImageBuf*>(m_ib)->set_deep_samples(m_x, m_y, m_z,
n);
}

/// Set the deep data value of sample s of channel c. (Only use this
/// if deep_alloc() has been called.)
void set_deep_value(int c, int s, float value)
{
ensure_writable();
return const_cast<ImageBuf*>(m_ib)->set_deep_value(m_x, m_y, m_z, c,
s, value);
}
void set_deep_value(int c, int s, uint32_t value)
{
ensure_writable();
return const_cast<ImageBuf*>(m_ib)->set_deep_value(m_x, m_y, m_z, c,
s, value);
}

protected:
friend class ImageBuf;
friend class ImageBufImpl;
Expand Down Expand Up @@ -1799,30 +1823,6 @@ class OIIO_API ImageBuf {
TypeDesc::BASETYPE(m_pixeltype), m_proxydata,
m_nchannels);
}

/// Set the number of deep data samples at this pixel. (Only use
/// this if deep_alloc() has not yet been called on the buffer.)
void set_deep_samples(int n)
{
ensure_writable();
return const_cast<ImageBuf*>(m_ib)->set_deep_samples(m_x, m_y, m_z,
n);
}

/// Set the deep data value of sample s of channel c. (Only use this
/// if deep_alloc() has been called.)
void set_deep_value(int c, int s, float value)
{
ensure_writable();
return const_cast<ImageBuf*>(m_ib)->set_deep_value(m_x, m_y, m_z, c,
s, value);
}
void set_deep_value(int c, int s, uint32_t value)
{
ensure_writable();
return const_cast<ImageBuf*>(m_ib)->set_deep_value(m_x, m_y, m_z, c,
s, value);
}
};


Expand Down
Loading
Loading