Cleanup: spelling in comments
This commit is contained in:
parent
706b13959e
commit
14fc02f91d
|
@ -22,7 +22,7 @@ class MetalDevice;
|
|||
thread_mutex MetalDevice::existing_devices_mutex;
|
||||
std::map<int, MetalDevice *> MetalDevice::active_device_ids;
|
||||
|
||||
/* Thread-safe device access for async work. Calling code must pass an appropriatelty scoped lock
|
||||
/* Thread-safe device access for async work. Calling code must pass an appropriately scoped lock
|
||||
* to existing_devices_mutex to safeguard against destruction of the returned instance. */
|
||||
MetalDevice *MetalDevice::get_device_by_ID(int ID, thread_scoped_lock &existing_devices_mutex_lock)
|
||||
{
|
||||
|
@ -377,7 +377,7 @@ bool MetalDevice::load_kernels(const uint _kernel_features)
|
|||
|
||||
/* Only request generic kernels if they aren't cached in memory. */
|
||||
if (make_source_and_check_if_compile_needed(PSO_GENERIC)) {
|
||||
/* If needed, load them asynchronously in order to responsively message progess to the user. */
|
||||
/* If needed, load them asynchronously in order to responsively message progress to the user. */
|
||||
int this_device_id = this->device_id;
|
||||
auto compile_kernels_fn = ^() {
|
||||
compile_and_load(this_device_id, PSO_GENERIC);
|
||||
|
@ -401,8 +401,7 @@ bool MetalDevice::make_source_and_check_if_compile_needed(MetalPipelineType pso_
|
|||
void MetalDevice::compile_and_load(int device_id, MetalPipelineType pso_type)
|
||||
{
|
||||
/* Thread-safe front-end compilation. Typically the MSL->AIR compilation can take a few seconds,
|
||||
* so we avoid blocking device teardown if the user cancels a render immediately.
|
||||
*/
|
||||
* so we avoid blocking device tear-down if the user cancels a render immediately. */
|
||||
|
||||
id<MTLDevice> mtlDevice;
|
||||
string source;
|
||||
|
|
|
@ -81,7 +81,7 @@ struct Global {
|
|||
* To solve this, the memory counts are added to these global counters when the thread
|
||||
* exists. The global counters are also used when the entire process starts to exit, because the
|
||||
* #Local data of the main thread is already destructed when the leak detection happens (during
|
||||
* destruction of static variables which happens after destruction of threadlocals).
|
||||
* destruction of static variables which happens after destruction of thread-locals).
|
||||
*/
|
||||
std::atomic<int64_t> mem_in_use_outside_locals = 0;
|
||||
/**
|
||||
|
@ -153,7 +153,7 @@ Local::~Local()
|
|||
|
||||
if (this->is_main) {
|
||||
/* The main thread started shutting down. Use global counters from now on to avoid accessing
|
||||
* threadlocals after they have been destructed. */
|
||||
* thread-locals after they have been destructed. */
|
||||
use_local_counters.store(false, std::memory_order_relaxed);
|
||||
}
|
||||
/* Helps to detect when thread locals are accidentally accessed after destruction. */
|
||||
|
@ -179,7 +179,7 @@ static void update_global_peak()
|
|||
|
||||
void memory_usage_init()
|
||||
{
|
||||
/* Makes sure that the static and threadlocal variables on the main thread are initialized. */
|
||||
/* Makes sure that the static and thread-local variables on the main thread are initialized. */
|
||||
get_local_data();
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace blender::bke {
|
|||
* additional information for anonymous attributes on disk (like which node created it). This
|
||||
* information can then be used to map stored attributes to their run-time counterpart.
|
||||
*
|
||||
* Once created, #AnonymousAttributeID is immutable. Also it is intrinsicly reference counted so
|
||||
* Once created, #AnonymousAttributeID is immutable. Also it is intrinsically reference counted so
|
||||
* that it can have shared ownership. `std::shared_ptr` can't be used for that purpose here,
|
||||
* because that is not available in C code. If possible, the #AutoAnonymousAttributeID wrapper
|
||||
* should be used to avoid manual reference counting in C++ code.
|
||||
|
|
|
@ -2845,7 +2845,7 @@ static bool rename_anim_channels(bAnimContext *ac, int channel_index)
|
|||
int filter;
|
||||
bool success = false;
|
||||
|
||||
/* Filter relevant channels (note that greasepencil/annotations are not displayed in Graph
|
||||
/* Filter relevant channels (note that grease-pencil/annotations are not displayed in Graph
|
||||
* Editor). */
|
||||
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS);
|
||||
if (ELEM(ac->datatype, ANIMCONT_FCURVES, ANIMCONT_NLA)) {
|
||||
|
|
|
@ -86,7 +86,7 @@ struct NodeClipboard {
|
|||
Map<const bNode *, bNode *> &node_map,
|
||||
Map<const bNodeSocket *, bNodeSocket *> &socket_map)
|
||||
{
|
||||
/* No ID refcounting, this node is virtual,
|
||||
/* No ID reference-counting, this node is virtual,
|
||||
* detached from any actual Blender data currently. */
|
||||
bNode *new_node = bke::node_copy_with_mapping(
|
||||
nullptr, node, LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_MAIN, false, socket_map);
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
struct NodeInsertOfsData {
|
||||
bNodeTree *ntree;
|
||||
bNode *insert; /* Inserted node. */
|
||||
bNode *prev, *next; /* Prev/next node in the chain. */
|
||||
bNode *prev, *next; /* Previous/next node in the chain. */
|
||||
bNode *insert_parent;
|
||||
|
||||
wmTimer *anim_timer;
|
||||
|
|
|
@ -1074,7 +1074,7 @@ class Executor {
|
|||
bool try_enable_multi_threading()
|
||||
{
|
||||
#ifndef WITH_TBB
|
||||
/* The non-tbb task pool has the property that it immediately executes tasks under some
|
||||
/* The non-TBB task pool has the property that it immediately executes tasks under some
|
||||
* circumstances. This is not supported here because tasks might be scheduled while another
|
||||
* node is in the middle of being executed on the same thread. */
|
||||
return false;
|
||||
|
|
|
@ -2453,7 +2453,7 @@ static void lineart_object_load_single_instance(LineartData *ld,
|
|||
if ((!use_mesh) || use_mesh->edit_mesh) {
|
||||
/* If the object is being edited, then the mesh is not evaluated fully into the final
|
||||
* result, do not load them. This could be caused by incorrect evaluation order due to
|
||||
* the way line art uses depsgraph.See T102612 for explaination of this workaround. */
|
||||
* the way line art uses depsgraph.See T102612 for explanation of this workaround. */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1013,7 +1013,7 @@ class LazyFunctionForAnonymousAttributeSetExtract : public lf::LazyFunction {
|
|||
};
|
||||
|
||||
/**
|
||||
* Conditionally joines multiple attribute sets. Each input attribute set can be disabled with a
|
||||
* Conditionally joins multiple attribute sets. Each input attribute set can be disabled with a
|
||||
* corresponding boolean input.
|
||||
*/
|
||||
class LazyFunctionForAnonymousAttributeSetJoin : public lf::LazyFunction {
|
||||
|
|
|
@ -159,7 +159,7 @@ static void wm_keymap_item_properties_update_ot_from_list(ListBase *km_lb)
|
|||
static bool wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b)
|
||||
{
|
||||
return (STREQ(a->idname, b->idname) &&
|
||||
/* We do not really care about which Main we pass here, tbh. */
|
||||
/* We do not really care about which Main we pass here, TBH. */
|
||||
RNA_struct_equals(G_MAIN, a->ptr, b->ptr, RNA_EQ_UNSET_MATCH_NONE) &&
|
||||
(a->flag & KMI_INACTIVE) == (b->flag & KMI_INACTIVE) && a->propvalue == b->propvalue);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue