diff README @ 15:e05c257c6a23

*: huge refactor, add many new x86 intrinsics and the like ALSO!! now intrinsics are enabled at runtime, depending on what is detected. altivec *should* still work but I only tested compiling it. the major version has been updated to 2.0 for this...
author Paper <paper@tflc.us>
date Wed, 20 Nov 2024 04:10:37 -0500
parents f12b5dd4e18c
children e26874655738
line wrap: on
line diff
--- a/README	Tue Nov 19 15:55:01 2024 -0500
+++ b/README	Wed Nov 20 04:10:37 2024 -0500
@@ -1,19 +1,19 @@
 vec - a tiny SIMD vector header-only library written in C99
 
-it comes with an extremely basic (and somewhat lacking) API,
-where there are eight supported vector types, all 128-bit:
+it comes with an extremely basic API that is similar to other intrinsics
+libraries; each type is in the exact same format:
 
-	vint8x16  - 16 signed 8-bit integers
-	vint16x8  - 8 signed 16-bit integers
-	vint32x4  - 4 signed 32-bit integers
-	vint64x2  - 2 signed 64-bit integers
-	vuint8x16 - 16 unsigned 8-bit integers
-	vuint16x8 - 8 unsigned 16-bit integers
-	vuint32x4 - 4 unsigned 32-bit integers
-	vuint32x4 - 2 unsigned 64-bit integers
+	v[sign][bits]x[size]
+		where `sign' is either nothing (for signed) or `u' (for unsigned),
+		`bits' is the bit size of the integer format,
+		and `size' is the how many integers are in the vector
 
-all of these have many operations that are prefixed with the
-name of the type and an underscore, for example:
+vec provides types for 64-bit, 128-bit, 256-bit, and 512-bit SIMD intrinsics
+on processors where vec has an implementation and falls back to array-based
+implementations where they are not.
+
+all of these have many operations that are prefixed with the name of the
+type and an underscore, for example:
 
 	vint8x16 vint8x16_splat(uint8_t x)
 	- creates a vint8x16 where all of the values are filled
@@ -106,3 +106,10 @@
 		the result vector if the value in `vec1' is greater
 		than or equal to the corresponding value in `vec2',
 		else all of the bits are turned off.
+
+to initialize vec, you MUST call `vec_init()' when your programs starts up.
+
+note that `vec_init()' is NOT thread-safe, and things can and will
+blow up if you call it simultaneously from different threads (i.e. you
+try to only initialize it when you need to... please just initialize
+it on startup so you don't have to worry about that!!!)