mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Enable SIMD convolution by default #1213
This commit is contained in:
@@ -82,23 +82,20 @@ function counters () {
|
||||
* Improves the performance of `resize`, `blur` and `sharpen` operations
|
||||
* by taking advantage of the SIMD vector unit of the CPU, e.g. Intel SSE and ARM NEON.
|
||||
*
|
||||
* This feature is currently off by default but future versions may reverse this.
|
||||
* Versions of liborc prior to 0.4.25 are known to segfault under heavy load.
|
||||
*
|
||||
* @example
|
||||
* const simd = sharp.simd();
|
||||
* // simd is `true` if SIMD is currently enabled
|
||||
* // simd is `true` if the runtime use of liborc is currently enabled
|
||||
* @example
|
||||
* const simd = sharp.simd(true);
|
||||
* // attempts to enable the use of SIMD, returning true if available
|
||||
* const simd = sharp.simd(false);
|
||||
* // prevent libvips from using liborc at runtime
|
||||
*
|
||||
* @param {Boolean} [simd=false]
|
||||
* @param {Boolean} [simd=true]
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
function simd (simd) {
|
||||
return sharp.simd(is.bool(simd) ? simd : null);
|
||||
}
|
||||
simd(false);
|
||||
simd(true);
|
||||
|
||||
/**
|
||||
* Decorate the Sharp class with utility-related functions.
|
||||
|
||||
Reference in New Issue
Block a user