Example #1
0
std::ostream& operator <<(std::ostream &os,
                          DebugFlagsConstRef debug_flags)
{
	os << "CPU flags:\n"
	   << "  AVX2       : " << string_from_bool(debug_flags.cpu.avx2) << "\n"
	   << "  AVX        : " << string_from_bool(debug_flags.cpu.avx) << "\n"
	   << "  SSE4.1     : " << string_from_bool(debug_flags.cpu.sse41) << "\n"
	   << "  SSE3       : " << string_from_bool(debug_flags.cpu.sse3) << "\n"
	   << "  SSE2       : " << string_from_bool(debug_flags.cpu.sse2) << "\n"
	   << "  BVH layout : " << bvh_layout_name(debug_flags.cpu.bvh_layout) << "\n"
	   << "  Split      : " << string_from_bool(debug_flags.cpu.split_kernel) << "\n";

	os << "CUDA flags:\n"
	   << " Adaptive Compile: " << string_from_bool(debug_flags.cuda.adaptive_compile) << "\n";

	const char *opencl_device_type,
	           *opencl_kernel_type;
	switch(debug_flags.opencl.device_type) {
		case DebugFlags::OpenCL::DEVICE_NONE:
			opencl_device_type = "NONE";
			break;
		case DebugFlags::OpenCL::DEVICE_ALL:
			opencl_device_type = "ALL";
			break;
		case DebugFlags::OpenCL::DEVICE_DEFAULT:
			opencl_device_type = "DEFAULT";
			break;
		case DebugFlags::OpenCL::DEVICE_CPU:
			opencl_device_type = "CPU";
			break;
		case DebugFlags::OpenCL::DEVICE_GPU:
			opencl_device_type = "GPU";
			break;
		case DebugFlags::OpenCL::DEVICE_ACCELERATOR:
			opencl_device_type = "ACCELERATOR";
			break;
	}
	switch(debug_flags.opencl.kernel_type) {
		case DebugFlags::OpenCL::KERNEL_DEFAULT:
			opencl_kernel_type = "DEFAULT";
			break;
		case DebugFlags::OpenCL::KERNEL_MEGA:
			opencl_kernel_type = "MEGA";
			break;
		case DebugFlags::OpenCL::KERNEL_SPLIT:
			opencl_kernel_type = "SPLIT";
			break;
	}
	os << "OpenCL flags:\n"
	   << "  Device type    : " << opencl_device_type << "\n"
	   << "  Kernel type    : " << opencl_kernel_type << "\n"
	   << "  Debug          : " << string_from_bool(debug_flags.opencl.debug) << "\n"
	   << "  Single program : " << string_from_bool(debug_flags.opencl.single_program) << "\n"
	   << "  Memory limit   : " << string_human_readable_size(debug_flags.opencl.mem_limit) << "\n";
	return os;
}
Example #2
0
std::ostream& operator <<(std::ostream &os,
                          const DeviceRequestedFeatures& requested_features)
{
	os << "Experimental features: "
	   << (requested_features.experimental ? "On" : "Off") << std::endl;
	os << "Max closure count: " << requested_features.max_closure << std::endl;
	os << "Max nodes group: " << requested_features.max_nodes_group << std::endl;
	/* TODO(sergey): Decode bitflag into list of names. */
	os << "Nodes features: " << requested_features.nodes_features << std::endl;
	os << "Use hair: "
	   << string_from_bool(requested_features.use_hair) << std::endl;
	os << "Use object motion: "
	   << string_from_bool(requested_features.use_object_motion) << std::endl;
	os << "Use camera motion: "
	   << string_from_bool(requested_features.use_camera_motion) << std::endl;
	os << "Use Baking: "
	   << string_from_bool(requested_features.use_baking) << std::endl;
	os << "Use Subsurface: "
	   << string_from_bool(requested_features.use_subsurface) << std::endl;
	os << "Use Volume: "
	   << string_from_bool(requested_features.use_volume) << std::endl;
	os << "Use Branched Integrator: "
	   << string_from_bool(requested_features.use_integrator_branched) << std::endl;
	os << "Use Patch Evaluation: "
	   << string_from_bool(requested_features.use_patch_evaluation) << std::endl;
	return os;
}
Example #3
0
std::string string_from_cull_face(bool cull,nya_render::cull_face::order order)
{
    if(!cull)
        return string_from_bool(false);

    return order==nya_render::cull_face::ccw?"ccw":"cw";
}
Example #4
0
std::string string_from_blend_mode(bool blend,nya_render::blend::mode src,nya_render::blend::mode dst)
{
    if(!blend)
        return string_from_bool(false);

    return string_from_blend_mode(src)+":"+string_from_blend_mode(dst);
}
Example #5
0
//**************************[system_adc_print]********************************* 16.09.2014
void system_adc_print(void (*out)(uint8_t)) {
  string_from_const(out, "adc:"                                        "\r\n");

  string_from_const_length(out, "  enabled", 15); string_from_const(out, ": ");
  string_from_bool(out, adc_is_enabled());      string_from_const(out, "\r\n");

  uint8_t nr;
  for (nr = 0; nr < 8; nr++) {
    string_from_const(out, "  channel["); out(nr + 48);
    string_from_const_length(out, "]", 15 - 11);
    string_from_const(out, ": ");
    string_from_uint(out, system_adc_values[nr], 4);
    string_from_const(out, "\r\n");
  }

  string_from_const(out,                                               "\r\n");
}
Example #6
0
std::ostream& operator <<(std::ostream &os,
                          const DeviceRequestedFeatures& requested_features)
{
	os << "Experimental features: "
	   << (requested_features.experimental ? "On" : "Off") << std::endl;
	os << "Max nodes group: " << requested_features.max_nodes_group << std::endl;
	/* TODO(sergey): Decode bitflag into list of names. */
	os << "Nodes features: " << requested_features.nodes_features << std::endl;
	os << "Use Hair: "
	   << string_from_bool(requested_features.use_hair) << std::endl;
	os << "Use Object Motion: "
	   << string_from_bool(requested_features.use_object_motion) << std::endl;
	os << "Use Camera Motion: "
	   << string_from_bool(requested_features.use_camera_motion) << std::endl;
	os << "Use Baking: "
	   << string_from_bool(requested_features.use_baking) << std::endl;
	os << "Use Subsurface: "
	   << string_from_bool(requested_features.use_subsurface) << std::endl;
	os << "Use Volume: "
	   << string_from_bool(requested_features.use_volume) << std::endl;
	os << "Use Branched Integrator: "
	   << string_from_bool(requested_features.use_integrator_branched) << std::endl;
	os << "Use Patch Evaluation: "
	   << string_from_bool(requested_features.use_patch_evaluation) << std::endl;
	os << "Use Transparent Shadows: "
	   << string_from_bool(requested_features.use_transparent) << std::endl;
	os << "Use Principled BSDF: "
	   << string_from_bool(requested_features.use_principled) << std::endl;
	os << "Use Denoising: "
	   << string_from_bool(requested_features.use_denoising) << std::endl;
	return os;
}