|
Blender V5.3
|
#include "blender/device.h"#include "blender/session.h"#include "blender/util.h"#include "BKE_scene.hh"#include "RNA_prototypes.hh"Go to the source code of this file.
Enumerations | |
| enum | ComputeDevice { COMPUTE_DEVICE_CPU = 0 , COMPUTE_DEVICE_CUDA = 1 , COMPUTE_DEVICE_OPTIX = 3 , COMPUTE_DEVICE_HIP = 4 , COMPUTE_DEVICE_METAL = 5 , COMPUTE_DEVICE_ONEAPI = 6 , COMPUTE_DEVICE_NUM } |
Functions | |
| int | blender_device_threads (blender::Scene &b_scene) |
| static void | adjust_device_info_from_preferences (DeviceInfo &info, blender::PointerRNA cpreferences) |
| static void | adjust_device_info (DeviceInfo &device, blender::PointerRNA cpreferences, bool preview) |
| DeviceInfo | blender_device_info (blender::UserDef &b_preferences, blender::Scene &b_scene, bool background, bool preview, DeviceInfo &preferences_device) |
| enum ComputeDevice |
| Enumerator | |
|---|---|
| COMPUTE_DEVICE_CPU | |
| COMPUTE_DEVICE_CUDA | |
| COMPUTE_DEVICE_OPTIX | |
| COMPUTE_DEVICE_HIP | |
| COMPUTE_DEVICE_METAL | |
| COMPUTE_DEVICE_ONEAPI | |
| COMPUTE_DEVICE_NUM | |
Definition at line 14 of file blender/device.cpp.
|
static |
Definition at line 64 of file blender/device.cpp.
References adjust_device_info(), adjust_device_info_from_preferences(), DeviceInfo::kernel_optimization_level, KERNEL_OPTIMIZATION_LEVEL_FULL, KERNEL_OPTIMIZATION_LEVEL_OFF, KERNEL_OPTIMIZATION_NUM_LEVELS, and DeviceInfo::multi_devices.
Referenced by adjust_device_info(), and blender_device_info().
|
static |
Definition at line 36 of file blender/device.cpp.
References adjust_device_info_from_preferences(), DEVICE_HIP, DEVICE_METAL, DEVICE_ONEAPI, DeviceInfo::has_peer_memory, METALRT_AUTO, METALRT_NUM_SETTINGS, METALRT_OFF, METALRT_ON, DeviceInfo::type, DeviceInfo::use_hardware_raytracing, and DeviceInfo::use_metalrt_by_default.
Referenced by adjust_device_info(), and adjust_device_info_from_preferences().
| DeviceInfo blender_device_info | ( | blender::UserDef & | b_preferences, |
| blender::Scene & | b_scene, | ||
| bool | background, | ||
| bool | preview, | ||
| DeviceInfo & | preferences_device ) |
Definition at line 84 of file blender/device.cpp.
References blender::UserDef::addons, adjust_device_info(), Device::available_devices(), blender_device_info(), blender_device_threads(), COMPUTE_DEVICE_CPU, COMPUTE_DEVICE_CUDA, COMPUTE_DEVICE_HIP, COMPUTE_DEVICE_METAL, COMPUTE_DEVICE_NUM, COMPUTE_DEVICE_ONEAPI, COMPUTE_DEVICE_OPTIX, DEVICE_MASK_ALL, DEVICE_MASK_CPU, DEVICE_MASK_CUDA, DEVICE_MASK_HIP, DEVICE_MASK_METAL, DEVICE_MASK_ONEAPI, DEVICE_MASK_OPTIX, BlenderSession::device_override, Device::dummy_device(), Device::get_multi_device(), blender::Scene::id, mask(), blender::bAddon::module, blender::CollectionPropertyIterator::ptr, blender::RNA_property_collection_end(), STREQ, and blender::CollectionPropertyIterator::valid.
Referenced by blender_device_info(), denoise_func(), and BlenderSync::get_session_params().
| int blender_device_threads | ( | blender::Scene & | b_scene | ) |
Definition at line 25 of file blender/device.cpp.
References blender_device_threads(), blender::BLI_system_num_threads_override_get(), blender::RenderData::mode, blender::Scene::r, and blender::R_FIXED_THREADS.
Referenced by blender_device_info(), blender_device_threads(), and BlenderSync::get_session_params().