4 ms·
An implementation of the “core” math function of the C standard library, colloquially known as libm. Think implementing cos(x) using only pure C (so essentiall
by Ecco 6y ago
An implementation of the “core” math function of the C standard library, colloquially known as libm.
Think implementing cos(x) using only pure C (so essentially addition, subtraction, multiplication and division of floats).
- nextaccountic 6y agoIt actually contains quite a lot of asm, for example this for avx2-capable processors https://github.com/amd/aocl-libm-ose/tree/master/src/isa/avx2/masm https://github.com/amd/aocl-libm-ose/tree/master/src/isa/avx...
- tuananh 6y agoi can't imagine myself writing this kidn of assembly code. is this generated code?
- stagger87 6y agoI'm going to guess no. There are lots of comments that provide context for the various statements, and there are lots of commented out lines that are probably from prior iterations. Additionally the formatting is not consistent (aka human like). I've definitely written vectorized ASM that looks like the before.
- tuananh 6y agoi dont work with asm so pls forgive me. how can one write sth like this? ``` DQ 03ff0842108421084h DQ 03ff07b9f29b8eae2h DQ 03ff073260a47f7c6h DQ 03ff06ab59c7912fbh DQ 03ff0624dd2f1a9fch DQ 03ff059eea0727586h DQ 03ff05197f7d73404h DQ 03ff04949cc1664c5h DQ 03ff0410410410410h DQ 03ff038c6b78247fch DQ 03ff03091b51f5e1ah ```
- 0-_-0 6y agoCan anyone say what the meaning of the prefixes are: vrd2, vrda, vrs4, vrsa Are these different vector lengths?