.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "rtcNewBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" .hy .SS NAME .IP .nf \f[C] rtcNewBufferHostDevice - creates a new data buffer with explicitly managed host and device memory allocations \f[R] .fi .SS SYNOPSIS .IP .nf \f[C] #include RTCBuffer rtcNewBufferHostDevice( RTCDevice device, size_t byteSize ); \f[R] .fi .SS DESCRIPTION .PP The \f[V]rtcNewBufferHostDevice\f[R] function creates a new data buffer object of specified size in bytes (\f[V]byteSize\f[R] argument) that is bound to the specified device (\f[V]device\f[R] argument). The buffer object is reference counted with an initial reference count of 1. The returned buffer object can be released using the \f[V]rtcReleaseBuffer\f[R] API call. If Embree has SYCL support enabled and the SYCL device has no host unifed memory (e.g, a discrete GPU), the buffer allocates memory on the host and device explicitly. After the buffer is modified on the host \f[V]rtcCommitBuffer\f[R] can be used to synchronize host and device memory by copying the buffer content from the host to device. If the Embree version has no SYCL support or the SYCL device has host unified memory, the buffer will behave the same as a buffer created using \f[V]rtcNewBuffer\f[R]. The specified number of bytes are allocated at buffer construction time and deallocated when the buffer is destroyed. .IP .nf \f[C] \f[R] .fi .SS EXIT STATUS .PP On failure \f[V]NULL\f[R] is returned and an error code is set that can be queried using \f[V]rtcGetDeviceError\f[R]. .SS SEE ALSO .PP [rtcCommitBuffer], [rtcNewBuffer], [rtcRetainBuffer], [rtcReleaseBuffer]