[Bf-blender-cvs] [a99022e22dd] master: Cleanup: spelling in comments
Campbell Barton
noreply at git.blender.org
Tue Feb 7 04:17:36 CET 2023
Commit: a99022e22dd8876cec76aa3dd5b738efa48af9ec
Author: Campbell Barton
Date: Tue Feb 7 14:17:01 2023 +1100
Branches: master
https://developer.blender.org/rBa99022e22dd8876cec76aa3dd5b738efa48af9ec
Cleanup: spelling in comments
===================================================================
M intern/cycles/device/device.h
M intern/cycles/device/metal/util.mm
M intern/cycles/util/math_fast.h
M intern/ghost/intern/GHOST_SystemWin32.h
M intern/ghost/intern/GHOST_SystemX11.cpp
M intern/mikktspace/mikk_util.hh
M intern/opensubdiv/internal/evaluator/eval_output.h
M source/blender/blenkernel/intern/displist.cc
M source/blender/blenkernel/intern/pbvh_bmesh.cc
M source/blender/editors/sculpt_paint/sculpt_filter_color.c
===================================================================
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 370ec8b0638..a8b5e0842f4 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -371,7 +371,7 @@ class GPUDevice : public Device {
size_t preferred_working_headroom = 0);
virtual void move_textures_to_host(size_t size, bool for_texture);
- /* Allocation, deallocation and copy functions, with coresponding
+ /* Allocation, deallocation and copy functions, with corresponding
* support of device/host allocations. */
virtual GPUDevice::Mem *generic_alloc(device_memory &mem, size_t pitch_padding = 0);
virtual void generic_free(device_memory &mem);
@@ -388,9 +388,9 @@ class GPUDevice : public Device {
virtual void free_host(void *shared_pointer) = 0;
- /* This function should return device pointer coresponding to shared pointer, which
+ /* This function should return device pointer corresponding to shared pointer, which
* is host buffer, allocated in `alloc_host`. The function should `true`, if such
- * address transformation is possible and `false` overwise */
+ * address transformation is possible and `false` otherwise. */
virtual bool transform_host_pointer(void *&device_pointer, void *&shared_pointer) = 0;
virtual void copy_host_to_device(void *device_pointer, void *host_pointer, size_t size) = 0;
diff --git a/intern/cycles/device/metal/util.mm b/intern/cycles/device/metal/util.mm
index 03afe67628e..df4e146f759 100644
--- a/intern/cycles/device/metal/util.mm
+++ b/intern/cycles/device/metal/util.mm
@@ -103,7 +103,7 @@ vector<id<MTLDevice>> const &MetalInfo::get_usable_devices()
}
/* If the system has both an AMD GPU (discrete) and an Intel one (integrated), prefer the AMD
- * one. This can be overriden with CYCLES_METAL_FORCE_INTEL. */
+ * one. This can be overridden with CYCLES_METAL_FORCE_INTEL. */
bool has_usable_amd_gpu = false;
if (@available(macos 12.3, *)) {
for (id<MTLDevice> device in MTLCopyAllDevices()) {
diff --git a/intern/cycles/util/math_fast.h b/intern/cycles/util/math_fast.h
index f7576668151..c7d44739af9 100644
--- a/intern/cycles/util/math_fast.h
+++ b/intern/cycles/util/math_fast.h
@@ -74,7 +74,7 @@ ccl_device float fast_sinf(float x)
*
* Results on: [-2pi,2pi].
*
- * Examined 2173837240 values of sin: 0.00662760244 avg ulp diff, 2 max ulp,
+ * Examined 2173837240 values of sin: 0.00662760244 avg ULP diff, 2 max ULP,
* 1.19209e-07 max error
*/
int q = fast_rint(x * M_1_PI_F);
@@ -256,11 +256,11 @@ ccl_device float fast_acosf(float x)
/* clamp and crush denormals. */
const float m = (f < 1.0f) ? 1.0f - (1.0f - f) : 1.0f;
/* Based on http://www.pouet.net/topic.php?which=9132&page=2
- * 85% accurate (ulp 0)
+ * 85% accurate (ULP 0)
* Examined 2130706434 values of acos:
- * 15.2000597 avg ulp diff, 4492 max ulp, 4.51803e-05 max error // without "denormal crush"
+ * 15.2000597 avg ULP diff, 4492 max ULP, 4.51803e-05 max error // without "denormal crush"
* Examined 2130706434 values of acos:
- * 15.2007108 avg ulp diff, 4492 max ulp, 4.51803e-05 max error // with "denormal crush"
+ * 15.2007108 avg ULP diff, 4492 max ULP, 4.51803e-05 max error // with "denormal crush"
*/
const float a = sqrtf(1.0f - m) *
(1.5707963267f + m * (-0.213300989f + m * (0.077980478f + m * -0.02164095f)));
@@ -270,9 +270,8 @@ ccl_device float fast_acosf(float x)
ccl_device float fast_asinf(float x)
{
/* Based on acosf approximation above.
- * Max error is 4.51133e-05 (ulps are higher because we are consistently off
- * by a little amount).
- */
+ * Max error is 4.51133e-05 (ULPS are higher because we are consistently off
+ * by a little amount). */
const float f = fabsf(x);
/* Clamp and crush denormals. */
const float m = (f < 1.0f) ? 1.0f - (1.0f - f) : 1.0f;
@@ -290,9 +289,9 @@ ccl_device float fast_atanf(float x)
const float t = s * s;
/* http://mathforum.org/library/drmath/view/62672.html
* Examined 4278190080 values of atan:
- * 2.36864877 avg ulp diff, 302 max ulp, 6.55651e-06 max error // (with denormals)
+ * 2.36864877 avg ULP diff, 302 max ULP, 6.55651e-06 max error // (with denormals)
* Examined 4278190080 values of atan:
- * 171160502 avg ulp diff, 855638016 max ulp, 6.55651e-06 max error // (crush denormals)
+ * 171160502 avg ULP diff, 855638016 max ULP, 6.55651e-06 max error // (crush denormals)
*/
float r = s * madd(0.43157974f, t, 1.0f) / madd(madd(0.05831938f, t, 0.76443945f), t, 1.0f);
if (a > 1.0f) {
@@ -343,8 +342,8 @@ ccl_device float fast_log2f(float x)
int exponent = (int)(bits >> 23) - 127;
float f = __uint_as_float((bits & 0x007FFFFF) | 0x3f800000) - 1.0f;
/* Examined 2130706432 values of log2 on [1.17549435e-38,3.40282347e+38]:
- * 0.0797524457 avg ulp diff, 3713596 max ulp, 7.62939e-06 max error.
- * ulp histogram:
+ * 0.0797524457 avg ULP diff, 3713596 max ULP, 7.62939e-06 max error.
+ * ULP histogram:
* 0 = 97.46%
* 1 = 2.29%
* 2 = 0.11%
@@ -363,7 +362,7 @@ ccl_device float fast_log2f(float x)
ccl_device_inline float fast_logf(float x)
{
/* Examined 2130706432 values of logf on [1.17549435e-38,3.40282347e+38]:
- * 0.313865375 avg ulp diff, 5148137 max ulp, 7.62939e-06 max error.
+ * 0.313865375 avg ULP diff, 5148137 max ULP, 7.62939e-06 max error.
*/
return fast_log2f(x) * M_LN2_F;
}
@@ -371,7 +370,7 @@ ccl_device_inline float fast_logf(float x)
ccl_device_inline float fast_log10(float x)
{
/* Examined 2130706432 values of log10f on [1.17549435e-38,3.40282347e+38]:
- * 0.631237033 avg ulp diff, 4471615 max ulp, 3.8147e-06 max error.
+ * 0.631237033 avg ULP diff, 4471615 max ULP, 3.8147e-06 max error.
*/
return fast_log2f(x) * M_LN2_F / M_LN10_F;
}
@@ -392,12 +391,12 @@ ccl_device float fast_exp2f(float x)
/* Range reduction. */
int m = (int)x;
x -= m;
- x = 1.0f - (1.0f - x); /* Crush denormals (does not affect max ulps!). */
+ x = 1.0f - (1.0f - x); /* Crush denormals (does not affect max ULPS!). */
/* 5th degree polynomial generated with sollya
- * Examined 2247622658 values of exp2 on [-126,126]: 2.75764912 avg ulp diff,
- * 232 max ulp.
+ * Examined 2247622658 values of exp2 on [-126,126]: 2.75764912 avg ULP diff,
+ * 232 max ULP.
*
- * ulp histogram:
+ * ULP histogram:
* 0 = 87.81%
* 1 = 4.18%
*/
@@ -415,7 +414,7 @@ ccl_device float fast_exp2f(float x)
ccl_device_inline float fast_expf(float x)
{
/* Examined 2237485550 values of exp on [-87.3300018,87.3300018]:
- * 2.6666452 avg ulp diff, 230 max ulp.
+ * 2.6666452 avg ULP diff, 230 max ULP.
*/
return fast_exp2f(x / M_LN2_F);
}
@@ -454,7 +453,7 @@ ccl_device_inline float4 fast_expf4(float4 x)
ccl_device_inline float fast_exp10(float x)
{
/* Examined 2217701018 values of exp10 on [-37.9290009,37.9290009]:
- * 2.71732409 avg ulp diff, 232 max ulp.
+ * 2.71732409 avg ULP diff, 232 max ULP.
*/
return fast_exp2f(x * M_LN10_F / M_LN2_F);
}
@@ -475,7 +474,7 @@ ccl_device float fast_sinhf(float x)
float a = fabsf(x);
if (a > 1.0f) {
/* Examined 53389559 values of sinh on [1,87.3300018]:
- * 33.6886442 avg ulp diff, 178 max ulp. */
+ * 33.6886442 avg ULP diff, 178 max ULP. */
float e = fast_expf(a);
return copysignf(0.5f * e - 0.5f / e, x);
}
@@ -495,7 +494,7 @@ ccl_device float fast_sinhf(float x)
ccl_device_inline float fast_coshf(float x)
{
/* Examined 2237485550 values of cosh on [-87.3300018,87.3300018]:
- * 1.78256726 avg ulp diff, 178 max ulp.
+ * 1.78256726 avg ULP diff, 178 max ULP.
*/
float e = fast_expf(fabsf(x));
return 0.5f * e + 0.5f / e;
@@ -506,7 +505,7 @@ ccl_device_inline float fast_tanhf(float x)
/* Examined 4278190080 values of tanh on [-3.40282347e+38,3.40282347e+38]:
* 3.12924e-06 max error.
*/
- /* NOTE: ulp error is high because of sub-optimal handling around the origin. */
+ /* NOTE: ULP error is high because of sub-optimal handling around the origin. */
float e = fast_expf(2.0f * fabsf(x));
return copysignf(1.0f - 2.0f / (1.0f + e), x);
}
@@ -579,7 +578,7 @@ ccl_device_inline float fast_erfcf(float x)
{
/* Examined 2164260866 values of erfcf on [-4,4]: 1.90735e-06 max error.
*
- * ulp histogram:
+ * ULP histogram:
*
* 0 = 80.30%
*/
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index b9263219e0f..48443d56dc2 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -282,7 +282,7 @@ class GHOST_SystemWin32 : public GHOST_System {
GHOST_TSuccess exit();
/**
- * Converts raw WIN32 key codes from the wndproc to GHOST keys.
+ * Converts raw WIN32 key codes from the `wndproc` to GHOST keys.
* \param vKey: The virtual key from #hardKey.
* \param ScanCode: The ScanCode of pressed key (similar to PS/2 Set 1).
* \param extend: Flag if key is not primly (left or right).
@@ -291,7 +291,7 @@ class GHOST_SystemWin32 : public GHOST_System {
GHOST_TKey convertKey(short vKey, short ScanCode, short extend) const;
/**
- * Catches raw WIN32 key codes from WM_INPUT in the wndproc.
+ * Catches raw WIN32 key codes from WM_INPUT in the `wndproc`.
* \param raw: RawInput structure with detailed info about the key event.
* \param r_key_down: Set true when the key is pressed, otherwise false.
* \return The GHOST key (GHOST_kKeyUnknown if no match).
@@ -319,8 +319,8 @@ class GHOST_SystemWin32 : public GHOST_System {
* Creates tablet events from pointer events.
* \param type: The type of pointer event.
* \param window: The window receiving the event (the active window).
- * \param wParam: The wParam from the wndproc.
- * \param lParam: The lParam from the wndproc.
+ * \param wParam: The wParam from the `wndproc`.
+ * \param lParam: The lParam from the `wndproc`.
* \param eventhandled: True if the method handled the event.
*/
static void processPointerEvent(
@@ -337,8 +337,8 @@ class GHOST_SystemWin32 : public GH
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list