9# include <hiprt/hiprt.h>
26# elif defined(__linux__)
39static void get_hiprt_transform(
float matrix[][4],
Transform &tfm)
43 matrix[row][col++] = tfm.
x.
x;
44 matrix[row][col++] = tfm.
x.
y;
45 matrix[row][col++] = tfm.
x.
z;
46 matrix[row][col++] = tfm.
x.
w;
49 matrix[row][col++] = tfm.
y.
x;
50 matrix[row][col++] = tfm.
y.
y;
51 matrix[row][col++] = tfm.
y.
z;
52 matrix[row][col++] = tfm.
y.
w;
55 matrix[row][col++] = tfm.
z.
x;
56 matrix[row][col++] = tfm.
z.
y;
57 matrix[row][col++] = tfm.
z.
z;
58 matrix[row][col++] = tfm.
z.
w;
61bool HIPRTDevice::is_supported()
63# if defined(__linux__)
64 static bool is_initialized =
false;
65 static bool is_supported =
false;
70 is_initialized =
true;
77 "/opt/rocm/lib/libamdhip64.so",
78 "/opt/rocm/hip/lib/libamdhip64.so",
81 LOG_INFO <<
"Checking for libamdhip64.so";
83 for (
const char *hip_path : hip_paths) {
84 void *hip_lib = dlopen(hip_path, RTLD_LAZY);
86 LOG_DEBUG <<
"Found libamdhip64.so at: " << hip_path;
94 LOG_INFO <<
"libamdhip64.so not found, HIP-RT will be disabled";
108HIPRTDevice::HIPRTDevice(
const DeviceInfo &info,
112 : HIPDevice(info, stats, profiler, headless),
117 scratch_buffer_size(0),
119 prim_visibility(this,
"prim_visibility",
MEM_GLOBAL),
120 instance_transform_matrix(this,
"instance_transform_matrix",
MEM_READ_ONLY),
122 user_instance_id(this,
"user_instance_id",
MEM_GLOBAL),
126 HIPContextScope scope(
this);
127 global_stack_buffer = {0};
128 hiprtContextCreationInput hiprt_context_input = {
nullptr};
129 hiprt_context_input.ctxt = hipContext;
130 hiprt_context_input.device = hipDevice;
131 hiprt_context_input.deviceType = hiprtDeviceAMD;
132 hiprtError rt_result = hiprtCreateContext(HIPRT_API_VERSION, hiprt_context_input, hiprt_context);
134 if (rt_result != hiprtSuccess) {
135 set_error(
"Failed to create HIPRT context");
139 rt_result = hiprtCreateFuncTable(
140 hiprt_context, Max_Primitive_Type, Max_Intersect_Filter_Function, functions_table);
142 if (rt_result != hiprtSuccess) {
143 set_error(
"Failed to create HIPRT Function Table");
148 hiprtSetLogLevel(hiprt_context, hiprtLogLevelInfo | hiprtLogLevelWarn | hiprtLogLevelError);
151 hiprtSetLogLevel(hiprt_context, hiprtLogLevelNone);
155HIPRTDevice::~HIPRTDevice()
157 HIPContextScope scope(
this);
158 free_bvh_memory_delayed();
159 user_instance_id.free();
160 prim_visibility.free();
161 hiprt_blas_ptr.free();
163 instance_transform_matrix.free();
164 transform_headers.free();
166 hiprtDestroyGlobalStackBuffer(hiprt_context, global_stack_buffer);
167 hiprtDestroyFuncTable(hiprt_context, functions_table);
168 hiprtDestroyScene(hiprt_context, scene);
171 hip_assert(hipModuleUnload(hiprt_module_));
174 hiprtDestroyContext(hiprt_context);
179 return make_unique<HIPRTDeviceQueue>(
this);
182string HIPRTDevice::compile_kernel_get_common_cflags(
const uint64_t kernel_features)
184 string cflags = HIPDevice::compile_kernel_get_common_cflags(kernel_features);
186 cflags +=
" -D __KERNEL_HIPRT__ ";
191string HIPRTDevice::compile_kernel(
const uint64_t kernel_features,
196 hipDeviceGetAttribute(&major, hipDeviceAttributeComputeCapabilityMajor, hipDevId);
197 hipDeviceGetAttribute(&minor, hipDeviceAttributeComputeCapabilityMinor, hipDevId);
198 const std::string arch = hipDeviceArch(hipDevId);
200 if (!use_adaptive_compilation()) {
202 LOG_INFO <<
"Testing for pre-compiled kernel " << fatbin <<
".";
204 LOG_INFO <<
"Using precompiled kernel.";
209 string source_path =
path_get(
"source");
212 string common_cflags = compile_kernel_get_common_cflags(kernel_features);
215 const string include_path = source_path;
217 "cycles_%s_%s_%s.hipfb", name, arch.c_str(), kernel_md5.c_str());
219 const string hiprt_include_path =
path_join(source_path,
"kernel/device/hiprt");
221 LOG_INFO <<
"Testing for locally compiled kernel " << fatbin <<
".";
223 LOG_INFO <<
"Using locally compiled kernel.";
228 if (!use_adaptive_compilation() && have_precompiled_kernels()) {
229 if (!hipSupportsDevice(hipDevId)) {
231 string_printf(
"HIP backend requires compute capability 10.1 or up, but found %d.%d. "
232 "Your GPU is not supported.",
238 string_printf(
"HIP binary kernel for this graphics card compute "
239 "capability (%d.%d) not found.",
247 const char *
const hipcc = hipewCompilerPath();
248 if (hipcc ==
nullptr) {
250 "HIP hipcc compiler not found. "
251 "Install HIP toolkit in default location.");
255 const int hipcc_hip_version = hipewCompilerVersion();
256 LOG_INFO <<
"Found hipcc " << hipcc <<
", HIP version " << hipcc_hip_version <<
".";
257 if (hipcc_hip_version < 40) {
258 LOG_WARNING <<
"Unsupported HIP version " << hipcc_hip_version / 10 <<
"."
259 << hipcc_hip_version % 10 <<
", you need HIP 4.0 or newer.\n";
268 const char *
const kernel_ext =
"genco";
270 options.append(
"-Wno-parentheses-equality -Wno-unused-value -ffast-math -O3 -std=c++17");
271 options.append(
" --offload-arch=").append(arch.c_str());
277 string compile_command =
string_printf(
"%s %s -I %s -I %s --%s %s -o \"%s\" %s",
280 include_path.c_str(),
281 hiprt_include_path.c_str(),
285 common_cflags.c_str());
287 LOG_INFO_IMPORTANT <<
"Compiling " << ((use_adaptive_compilation()) ?
"adaptive " :
"")
288 <<
"HIP-RT kernel ... " << compile_command;
291 compile_command =
"call " + compile_command;
293 if (system(compile_command.c_str()) != 0) {
295 "Failed to execute linking command, "
296 "see console for details.");
300 LOG_INFO_IMPORTANT <<
"Kernel compilation finished in " << std::fixed << std::setprecision(2)
301 <<
time_dt() - starttime <<
"s";
306bool HIPRTDevice::load_kernels(
const uint64_t kernel_features)
309 if (use_adaptive_compilation()) {
310 LOG_INFO <<
"Skipping HIP kernel reload for adaptive compilation, not currently supported.";
315 if (hipContext ==
nullptr) {
319 if (!support_device(kernel_features)) {
330 const char *kernel_name =
"kernel";
331 string fatbin = compile_kernel(kernel_features, kernel_name);
332 if (fatbin.empty()) {
337 HIPContextScope scope(
this);
343 result = hipModuleLoadData(&hiprt_module_, fatbin_data.c_str());
346 result = hipErrorFileNotFound;
349 if (result != hipSuccess) {
351 "Failed to load HIP kernel from '%s' (%s)", fatbin.c_str(), hipewErrorString(result)));
354 if (result != hipSuccess) {
358 kernels.load_raytrace(
this, hiprt_module_);
360 return HIPDevice::load_kernels(kernel_features);
363void HIPRTDevice::const_copy_to(
const char *name,
void *host,
const size_t size)
366 HIPDevice::const_copy_to(name, host,
size);
368 HIPContextScope scope(
this);
372 if (strcmp(name,
"data") == 0) {
374 KernelData *
const data = (KernelData *)host;
375 *(hiprtScene *)&
data->device_bvh = scene;
378 hip_assert(hipModuleGetGlobal(&mem, &bytes, hiprt_module_,
"kernel_params"));
381# define KERNEL_DATA_ARRAY(data_type, data_name) \
382 if (strcmp(name, #data_name) == 0) { \
383 hip_assert(hipMemcpyHtoD(mem + offsetof(KernelParamsHIPRT, data_name), host, size)); \
391# include "kernel/data_arrays.h"
392# undef KERNEL_DATA_ARRAY
395hiprtGeometryBuildInput HIPRTDevice::prepare_triangle_blas(BVHHIPRT *bvh,
Mesh *mesh)
397 hiprtGeometryBuildInput geom_input;
405 bvh->custom_primitive_bound.alloc(num_triangles);
406 for (uint j = 0; j < num_triangles; j++) {
409 for (
int attr_step = 0; attr_step < attr_P->
num_motion_steps(); attr_step++) {
413 bvh->custom_primitive_bound[num_bounds] =
bounds;
417 bvh->custom_prim_aabb.aabbCount = num_bounds;
418 bvh->custom_prim_aabb.aabbStride =
sizeof(
BoundBox);
419 bvh->custom_primitive_bound.copy_to_device();
420 bvh->custom_prim_aabb.aabbs = (
void *)bvh->custom_primitive_bound.device_pointer;
422 geom_input.type = hiprtPrimitiveTypeAABBList;
423 geom_input.primitive.aabbList = bvh->custom_prim_aabb;
424 geom_input.geomType = Motion_Triangle;
426 if (bvh->custom_primitive_bound.device_pointer == 0) {
427 set_error(
"Failed to allocate triangle custom_primitive_bound for BLAS");
431 size_t triangle_size = mesh->get_triangles().size();
432 int *triangle_data = mesh->get_triangles().data();
438 bvh->triangle_mesh.triangleStride = 3 *
sizeof(int);
439 bvh->triangle_mesh.vertexCount = vertex_size;
443 int *triangle_index_data = bvh->triangle_index.resize(triangle_size);
444 float *vertex_data_data = bvh->vertex_data.resize(vertex_size * 3);
446 if (triangle_index_data && vertex_data_data) {
447 std::copy_n(triangle_data, triangle_size, triangle_index_data);
448 std::copy_n(verts, vertex_size,
reinterpret_cast<packed_float3 *
>(vertex_data_data));
450 bvh->triangle_index.copy_to_device();
451 bvh->vertex_data.copy_to_device();
454 bvh->triangle_mesh.triangleIndices = (
void *)(bvh->triangle_index.device_pointer);
455 bvh->triangle_mesh.vertices = (
void *)(bvh->vertex_data.device_pointer);
457 geom_input.type = hiprtPrimitiveTypeTriangleMesh;
458 geom_input.primitive.triangleMesh = bvh->triangle_mesh;
460 if (bvh->triangle_index.device_pointer == 0 || bvh->vertex_data.device_pointer == 0) {
461 set_error(
"Failed to allocate triangle data for BLAS");
468hiprtGeometryBuildInput HIPRTDevice::prepare_curve_blas(BVHHIPRT *bvh,
Hair *hair)
470 hiprtGeometryBuildInput geom_input;
478 bvh->custom_primitive_bound.alloc(num_segments);
482 for (uint j = 0; j < num_curves; j++) {
484 const float *curve_radius = hair->
get_radius();
485 for (
int k = 0; k < curve.
num_keys - 1; k++) {
490 bvh->custom_primitive_bound[num_bounds] =
bounds;
495 for (
int attr_step = 0; attr_step < attr_P->
num_motion_steps(); attr_step++) {
499 bvh->custom_primitive_bound[num_bounds] =
bounds;
505 bvh->custom_prim_aabb.aabbCount = num_bounds;
506 bvh->custom_prim_aabb.aabbStride =
sizeof(
BoundBox);
507 bvh->custom_primitive_bound.copy_to_device();
508 bvh->custom_prim_aabb.aabbs = (
void *)bvh->custom_primitive_bound.device_pointer;
510 geom_input.type = hiprtPrimitiveTypeAABBList;
511 geom_input.primitive.aabbList = bvh->custom_prim_aabb;
512 geom_input.geomType =
Curve;
514 if (bvh->custom_primitive_bound.device_pointer == 0) {
515 set_error(
"Failed to allocate curve custom_primitive_bound for BLAS");
521hiprtGeometryBuildInput HIPRTDevice::prepare_point_blas(BVHHIPRT *bvh,
PointCloud *pointcloud)
523 hiprtGeometryBuildInput geom_input;
537 const float *radius_data = pointcloud->
get_radius();
538 const size_t num_points = pointcloud->
num_points();
542 if (attr_P ==
nullptr) {
543 bvh->custom_primitive_bound.alloc(num_points);
544 for (uint j = 0; j < num_points; j++) {
549 bvh->custom_primitive_bound[num_bounds] =
bounds;
554 bvh->custom_primitive_bound.alloc(num_points);
556 for (uint j = 0; j < num_points; j++) {
559 for (
int attr_step = 0; attr_step < attr_P->
num_motion_steps(); attr_step++) {
564 bvh->custom_primitive_bound[num_bounds] =
bounds;
569 bvh->custom_prim_aabb.aabbCount = num_bounds;
570 bvh->custom_prim_aabb.aabbStride =
sizeof(
BoundBox);
571 bvh->custom_primitive_bound.copy_to_device();
572 bvh->custom_prim_aabb.aabbs = (
void *)bvh->custom_primitive_bound.device_pointer;
574 geom_input.type = hiprtPrimitiveTypeAABBList;
575 geom_input.primitive.aabbList = bvh->custom_prim_aabb;
576 geom_input.geomType =
Point;
578 if (bvh->custom_primitive_bound.device_pointer == 0) {
579 set_error(
"Failed to allocate point custom_primitive_bound for BLAS");
585void HIPRTDevice::build_blas(BVHHIPRT *bvh,
Geometry *geom)
587 hiprtGeometryBuildInput geom_input = {};
590 .buildFlags = hiprtBuildFlagBitPreferHighQualityBuild,
596 Mesh *mesh =
static_cast<Mesh *
>(geom);
600 geom_input = prepare_triangle_blas(bvh, mesh);
605 Hair *
const hair =
static_cast<Hair *const
>(geom);
609 geom_input = prepare_curve_blas(bvh, hair);
610 options.buildFlags = hiprtBuildFlagBitPreferBalancedBuild;
619 geom_input = prepare_point_blas(bvh, pointcloud);
620 options.buildFlags = hiprtBuildFlagBitPreferBalancedBuild;
632 assert(geom_input.geomType != hiprtInvalidValue);
639 size_t blas_scratch_buffer_size = 0;
640 hiprtError rt_err = hiprtGetGeometryBuildTemporaryBufferSize(
641 hiprt_context, geom_input,
options, blas_scratch_buffer_size);
643 if (rt_err != hiprtSuccess) {
644 set_error(
"Failed to get scratch buffer size for BLAS");
648 rt_err = hiprtCreateGeometry(hiprt_context, geom_input,
options, bvh->hiprt_geom);
650 if (rt_err != hiprtSuccess) {
651 set_error(
"Failed to create BLAS");
656 if (blas_scratch_buffer_size > scratch_buffer_size) {
657 scratch_buffer.alloc(blas_scratch_buffer_size);
658 scratch_buffer.zero_to_device();
659 if (!scratch_buffer.device_pointer) {
660 hiprtDestroyGeometry(hiprt_context, bvh->hiprt_geom);
661 bvh->hiprt_geom =
nullptr;
662 set_error(
"Failed to allocate scratch buffer for BLAS");
665 scratch_buffer_size = blas_scratch_buffer_size;
667 bvh->geom_input = geom_input;
668 rt_err = hiprtBuildGeometry(hiprt_context,
669 hiprtBuildOperationBuild,
672 (
void *)(scratch_buffer.device_pointer),
676 if (rt_err != hiprtSuccess) {
677 set_error(
"Failed to build BLAS");
684 size_t num_object = objects.size();
685 if (num_object == 0) {
689 const hiprtBuildOptions
options = {
690 .buildFlags = hiprtBuildFlagBitPreferHighQualityBuild,
693 hiprtBuildOperation build_operation =
refit ? hiprtBuildOperationUpdate :
694 hiprtBuildOperationBuild;
698 size_t num_instances = 0;
699 int blender_instance_id = 0;
701 user_instance_id.alloc(num_object);
702 prim_visibility.alloc(num_object);
703 hiprt_blas_ptr.alloc(num_object);
704 blas_ptr.alloc(num_object);
705 transform_headers.alloc(num_object);
707 for (
Object *ob : objects) {
709 if (ob->is_traceable()) {
710 mask = ob->visibility_for_tracing();
713 Transform current_transform = ob->get_tfm();
714 Geometry *geom = ob->get_geometry();
717 BVHHIPRT *current_bvh =
static_cast<BVHHIPRT *
>(geom->
bvh.get());
718 bool is_valid_geometry = current_bvh->geom_input.geomType != hiprtInvalidValue;
719 hiprtGeometry hiprt_geom_current = current_bvh->hiprt_geom;
721 hiprtFrameMatrix hiprt_transform_matrix = {{{0}}};
723 get_hiprt_transform(hiprt_transform_matrix.matrix, identity_matrix);
725 if (is_valid_geometry) {
726 hiprtTransformHeader current_header = {0};
727 current_header.frameCount = 1;
728 current_header.frameIndex = transform_matrix.
size();
729 if (use_motion_blur && ob->get_motion().size()) {
730 int motion_size = ob->get_motion().size();
734 float time_interval = 1 / (
float)(motion_size - 1);
735 current_header.frameCount = motion_size;
738 tfm_hiprt_mb.resize(motion_size);
739 for (
int i = 0; i < motion_size; i++) {
740 get_hiprt_transform(tfm_hiprt_mb[i].matrix, tfm_array[i]);
741 tfm_hiprt_mb[i].time = (
float)i * time_interval;
746 if (transform_applied) {
747 current_transform = identity_matrix;
749 get_hiprt_transform(hiprt_transform_matrix.matrix, current_transform);
753 transform_headers[num_instances] = current_header;
755 user_instance_id[num_instances] = blender_instance_id;
756 prim_visibility[num_instances] =
mask;
757 hiprt_blas_ptr[num_instances].geometry = hiprt_geom_current;
758 hiprt_blas_ptr[num_instances].type = hiprtInstanceTypeGeometry;
761 blas_ptr[blender_instance_id] = (
uint64_t)hiprt_geom_current;
762 blender_instance_id++;
765 size_t table_ptr_size = 0;
766 hipDeviceptr_t table_device_ptr;
769 hipModuleGetGlobal(&table_device_ptr, &table_ptr_size, hiprt_module_,
"kernel_params"));
774 size_t kernel_param_offset[4];
782 hip_assert(hipMemcpyHtoD(table_device_ptr + kernel_param_offset[
index],
783 (
void *)&functions_table,
790 if (num_instances == 0) {
794 int frame_count = transform_matrix.
size();
795 hiprtSceneBuildInput scene_input_ptr = {
nullptr};
796 scene_input_ptr.instanceCount = num_instances;
797 scene_input_ptr.frameCount = frame_count;
798 scene_input_ptr.frameType = hiprtFrameTypeMatrix;
800 user_instance_id.copy_to_device();
801 prim_visibility.copy_to_device();
802 hiprt_blas_ptr.copy_to_device();
803 blas_ptr.copy_to_device();
804 transform_headers.copy_to_device();
806 if (user_instance_id.device_pointer == 0 || prim_visibility.device_pointer == 0 ||
807 hiprt_blas_ptr.device_pointer == 0 || blas_ptr.device_pointer == 0 ||
808 transform_headers.device_pointer == 0)
810 set_error(
"Failed to allocate object buffers for TLAS");
816 hiprtFrameMatrix *instance_transform_matrix_data = instance_transform_matrix.resize(
818 if (instance_transform_matrix_data ==
nullptr) {
819 set_error(
"Failed to allocate host instance_transform_matrix for TLAS");
823 std::copy_n(transform_matrix.
data(), frame_count, instance_transform_matrix_data);
824 instance_transform_matrix.copy_to_device();
826 if (instance_transform_matrix.device_pointer == 0) {
827 set_error(
"Failed to allocate instance_transform_matrix for TLAS");
832 scene_input_ptr.instanceMasks = (
void *)prim_visibility.device_pointer;
833 scene_input_ptr.instances = (
void *)hiprt_blas_ptr.device_pointer;
834 scene_input_ptr.instanceTransformHeaders = (
void *)transform_headers.device_pointer;
835 scene_input_ptr.instanceFrames = (
void *)instance_transform_matrix.device_pointer;
837 hiprtScene scene =
nullptr;
839 hiprtError rt_err = hiprtCreateScene(hiprt_context, scene_input_ptr,
options, scene);
841 if (rt_err != hiprtSuccess) {
842 set_error(
"Failed to create TLAS");
846 size_t tlas_scratch_buffer_size;
847 rt_err = hiprtGetSceneBuildTemporaryBufferSize(
848 hiprt_context, scene_input_ptr,
options, tlas_scratch_buffer_size);
850 if (rt_err != hiprtSuccess) {
851 set_error(
"Failed to get scratch buffer size for TLAS");
852 hiprtDestroyScene(hiprt_context, scene);
856 if (tlas_scratch_buffer_size > scratch_buffer_size) {
857 scratch_buffer.alloc(tlas_scratch_buffer_size);
858 scratch_buffer.zero_to_device();
859 if (scratch_buffer.device_pointer == 0) {
860 set_error(
"Failed to allocate scratch buffer for TLAS");
861 hiprtDestroyScene(hiprt_context, scene);
866 rt_err = hiprtBuildScene(hiprt_context,
870 (
void *)scratch_buffer.device_pointer,
874 scratch_buffer.free();
875 scratch_buffer_size = 0;
877 if (rt_err != hiprtSuccess) {
878 set_error(
"Failed to build TLAS");
879 hiprtDestroyScene(hiprt_context, scene);
886void HIPRTDevice::free_bvh_memory_delayed()
889 if (stale_bvh.size()) {
890 for (
int bvh_index = 0; bvh_index < stale_bvh.size(); bvh_index++) {
891 hiprtGeometry hiprt_geom = stale_bvh[bvh_index];
892 hiprtDestroyGeometry(hiprt_context, hiprt_geom);
893 hiprt_geom =
nullptr;
899void HIPRTDevice::release_bvh(
BVH *bvh)
901 BVHHIPRT *current_bvh =
static_cast<BVHHIPRT *
>(bvh);
904 stale_bvh.push_back(current_bvh->hiprt_geom);
912 free_bvh_memory_delayed();
913 progress.
set_substatus(
"Building HIPRT acceleration structure");
915 BVHHIPRT *bvh_rt =
static_cast<BVHHIPRT *
>(bvh);
916 HIPContextScope scope(
this);
918 if (!bvh_rt->is_tlas()) {
920 assert(geometry.size() == 1);
921 build_blas(bvh_rt, geometry[0]);
925 hiprtDestroyScene(hiprt_context, scene);
928 scene = build_tlas(bvh_rt, bvh_rt->objects,
refit);
unsigned long long int uint64_t
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
void refit(btStridingMeshInterface *triangles, const btVector3 &aabbMin, const btVector3 &aabbMax)
Attribute * find(ustring name) const
const T * data(const int step=0) const
int num_motion_steps() const
const packed_float3 * get_position() const
virtual bool has_motion_blur() const
const float * get_radius() const
Curve get_curve(const size_t i) const
size_t num_curves() const
size_t num_segments() const
NODE_DECLARE size_t num_verts() const
bool has_motion_blur() const override
size_t num_triangles() const
Triangle get_triangle(const size_t i) const
Point get_point(const int i) const
size_t num_points() const
void set_substatus(const string &substatus_)
void push_back_slow(const T &t)
CCL_NAMESPACE_BEGIN struct Options options
#define KERNEL_DATA_ARRAY(type, name)
#define KERNEL_FEATURE_OBJECT_MOTION
#define CCL_NAMESPACE_END
#define assert(assertion)
#define LOG_INFO_IMPORTANT
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
string util_md5_string(const string &str)
BMesh const char void * data
string path_cache_get(const string &sub)
bool path_create_directories(const string &filepath)
string path_get(const string &sub)
string path_files_md5_hash(const string &dir)
string path_join(const string &dir, const string &file)
bool path_exists(const string &path)
bool path_read_compressed_text(const string &path, string &text)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
CCL_NAMESPACE_BEGIN string string_printf(const char *format,...)
void bounds_grow(const int k, const packed_float3 *curve_keys, const float *curve_radius, BoundBox &bounds) const
void bounds_grow(const packed_float3 *verts, BoundBox &bounds) const
void bounds_grow(const packed_float3 *points, const float *radius, BoundBox &bounds) const
std::unique_lock< std::mutex > thread_scoped_lock
CCL_NAMESPACE_BEGIN double time_dt()