diff --git a/vips.go b/vips.go index 43990f3..1d03c92 100644 --- a/vips.go +++ b/vips.go @@ -147,6 +147,17 @@ func VipsCacheDropAll() { C.vips_cache_drop_all() } +// VipsVectorSetEnabled enables or disables SIMD vector instructions. This can give speed-up, +// but can also be unstable on some systems and versions. +func VipsVectorSetEnabled(enable bool) { + flag := 0 + if enable { + flag = 1 + } + + C.vips_vector_set_enabled(C.int(flag)) +} + // VipsDebugInfo outputs to stdout libvips collected data. Useful for debugging. func VipsDebugInfo() { C.im__print_all() diff --git a/vips.h b/vips.h index 190317c..ab2c82e 100644 --- a/vips.h +++ b/vips.h @@ -3,6 +3,7 @@ #include #include #include +#include /** * Starting libvips 7.41, VIPS_ANGLE_x has been renamed to VIPS_ANGLE_Dx