Commit Graph

248 Commits (2a8af325347d5e90ce874f706f5746cd0ddaac9b)

Author SHA1 Message Date
Doug Coleman 7ee11ee03a math.vectors: Don't use macro with locals and cond in vif. Stack-checker/locals/macros/smart-combinators all need some work (a rewrite?), but meanwhile don't let it get in the way. Add tests. 2013-01-03 09:49:31 -08:00
Doug Coleman 10648ec1ea math.vectors: Fix spacing. 2013-01-02 00:09:21 -08:00
Alex Vondrak 09fd18b542 compiler.cfg.gvn.math: missed some availability checks that were causing math.vectors.simd.tests to fail (issue #671) 2012-09-18 00:07:10 -07:00
Doug Coleman ff1f90a583 math.vectors: Implement infinity p-norm and special-case l1-norm and l2-norm. 2012-08-30 16:47:45 -07:00
John Benediktsson e9e0b20ca6 math.vectors: implement v^, v^n, n^v. 2012-07-30 16:15:00 -07:00
John Benediktsson d6a5cc3ee8 math.vectors: adding p-norm. 2012-05-03 13:27:00 -07:00
John Benediktsson ce0e9aab98 math.vectors: separate "dot product" from "Hermitian inner product". Fixes #484. 2012-03-29 10:56:39 -07:00
John Benediktsson 0b59d246da math.vectors: fix some $examples in docs. 2011-12-29 17:31:55 -08:00
Joe Groff fb7172fd28 fix help-lint failures 2011-12-14 11:33:17 -08:00
Joe Groff 3365e1adbb math.vectors: add higher-order stack effect to vif 2011-12-13 19:46:44 -08:00
Joe Groff 30dc7d45e7 math.vectors.simd.intrinsics: fix deploy bug
If not called with a known-at-compile-time SIMD type, the intrinsic definitions were leaving behind runtime quotations that referenced the c-array words after c-type information had been stripped, causing deployed applications that used SIMD to fail.
2011-12-07 12:47:38 -08:00
Doug Coleman 5fb4b86fbf help-lint fixes for recent changes 2011-12-07 12:26:35 -08:00
Joe Groff eee483654a use radix literals 2011-11-23 19:03:40 -08:00
Joe Groff a520e7e5ee math.vectors.simd: don't try distance on int types
"v- norm" doesn't work right for uint-4s because of underflow, but who's going to call "distance" on a uint vector?
2011-11-13 16:10:27 -08:00
Joe Groff 3888e0bf67 math.vectors.simd: unencrypt check-optimizer
And make it report real information about what values were tested and how they failed
2011-11-13 16:10:27 -08:00
Joe Groff ce205e1e3a code beautification 2011-11-13 16:10:26 -08:00
Joe Groff 602fbd01de math.vectors.simd: add vcount to the tests
Also add a base case to (approx=) for integer returns. vcount returns an integer even for float vector inputs, but the test machinery isn't smart enough to figure that out and uses (approx=) on the outputs anyway.
2011-11-13 16:10:26 -08:00
Joe Groff c74d92a12c math.vectors.simd.intrinsics: fix double-2 vcount
Turns out we use MOVMSKPS for double vectors too. Gotta save that extra instruction byte!
2011-11-13 16:10:25 -08:00
Joe Groff a50c0a6624 math.vectors.simd: make vcount work for all ints 2011-11-13 16:10:23 -08:00
Joe Groff 6685af8b41 math.vectors.simd.intrinsics: better fake vgetmask
More accurate simulacrum of PMOVMSKB/MOVMSKPS/MOVMSKPD for non-intrinsic definition
2011-11-13 16:10:22 -08:00
Joe Groff 2c4c04f973 compiler: add intrinsic for PMOVMSKB/MOVMSKP[SD]
Combined with a fast bit-count this will let us rice byte-counting.
2011-11-13 16:10:20 -08:00
Doug Coleman be9f8a99f0 Rename lookup to lookup-word. 2011-11-06 16:00:00 -08:00
Doug Coleman be12f2b27d Make "foo.private" require load foo instead.
Move require from vocabs.loader to vocabs. Update everything.
Fixes #201.
2011-11-02 11:50:03 -07:00
Slava Pestov b8f0ffe5c4 math.vectors.simd: vlshift, vrshift, hlshift and hrshift were being miscompiled if the shift count was a bignum. Fixes #264 2011-10-30 21:50:17 -07:00
Doug Coleman f05e33fa37 Fix all failures in the linux64 build email 2011-10-24 19:33:09 -07:00
John Benediktsson f3b4b80be4 Remove unused words. Fixes #132. 2011-10-19 11:01:16 -07:00
John Benediktsson f2741b34a4 Eliminate duplicate syntax for stack effects "(" no longer drops and is identical to the old "((", which is now removed. 2011-10-18 13:19:39 -07:00
Doug Coleman 300138eb4d Refactor the lexer/parser to expose friendlier words for scanning tokens. The preferred top-level words now throw an exception on EOF.
CREATE -> scan-new
CREATE-CLASS -> scan-new-class
CREATE-WORD -> scan-new-word
CREATE-GENERIC -> scan-new-generic
scan -> (scan-token)
scan-token now throws on eof
(scan-word) returns word/number/f
scan-word now throws on eof
scan-word-name expects a non-number
Fixes #183.
Fixes #209.
2011-09-29 11:28:28 -07:00
John Benediktsson 0e3d598e69 specialized-arrays: performed some cleanup.
Specifically,
    •   Created >c-array to be replacement for >T-array.
    •   Created cast-array to be generic replacement for all T-array-cast words.
    •   Created c-array@ to be generic replacement for T-array@ words.
    •   Replaced usages of <T-array> with T <c-array>
    •   Replaced usages of <direct-T-array> with T <c-direct-array>
    •   Replaced usages of >T-array with T >c-array
    •   Replaced usages of T-array-cast with T cast-array
    •   Replaced usages of malloc-T-array with T malloc-array.
    •   Removed malloc-T-array.
    •   Removed T-array-cast.
    •   Removed T-array@.
    •   Removed >T-array.

I also added (but didn't change any code to use):
    •   T c-array-type, returns T-array
    •   T c-array?, returns T-array?
    •   c-array{ T ... }, returns T-array{ ... }

Bootstraps just find on Mac OS X.  Also `load-all test-all` works for me.
2011-09-26 11:37:51 -07:00
John Benediktsson 248b0df6fc Spelling fixes to documentation. 2011-08-26 16:20:31 -07:00
Keita Haga 2c324b14df In several documentation, remove whitespace before or after the colon or period 2011-02-10 01:51:13 +09:00
Slava Pestov f9ef26a910 math.vectors.simd: docs mention obsolete 'test-mr mr.' words 2010-08-20 18:00:03 -07:00
Slava Pestov 7fe6721993 math.matrices: move normal word from gpu.demos.bunny and reverse sign 2010-07-23 20:41:08 -07:00
Slava Pestov cf6b910c9f alien.data: remove second quotation parameter from with-out-parameters, now all values are copied properly and calling 'clone' on structs in this quotation is not necessary 2010-07-16 17:32:05 -04:00
Joe Groff 19727f8ca5 math.vectors.simd.cords: add regression test for >A 2010-06-15 22:44:15 -07:00
Joe Groff 1f6070d48c math.vectors.simd.cords: use head-slice/tail-slice to slice up input sequences for >A op so that e.g. float-4{ ... } >double-4 works 2010-06-15 21:55:26 -07:00
Slava Pestov f16e660805 mirrors: rename enumerated-sequence to inspected-sequence 2010-06-11 17:14:15 -04:00
Joe Groff 45e635fa4e math.vectors.simd.intrinsics: use unrolled loops for some software fallbacks 2010-05-24 18:39:06 -07:00
Joe Groff 7027838fda math.vectors.simd.intrinsics: remove call( -- ) wrapper from fallbacks 2010-05-24 12:58:14 -07:00
Joe Groff bceec9daeb math.vectors.simd.intrinsics: use <direct-X-array> instead of X-array-cast to construct view over fallback byte-arrays to avoid redundant array size checking 2010-05-23 23:18:02 -07:00
Joe Groff 9977f66c01 math.vectors.simd.intrinsics: wrap intrinsic fallback bodies in call( -- ) so we can abuse macros in their normally-inlined bodies 2010-05-23 22:39:44 -07:00
Slava Pestov b8ec5c6176 Stack allocation improvements
- New with-out-parameters combinator
- Inhibit tail call optimization in frames with local allocation, to ensure that passing a stack allocated value to the last word in the quotation works
- local allocations are now aligned properly
- spill slots are now aligned properly aligned in frames which have parameter and local allocation areas
2010-05-22 02:37:00 -04:00
Slava Pestov 40f58f27d6 specialized-arrays: rename byte-array>T-array to T-array-cast, and make it work with anything that responds to >c-ptr / byte-length 2010-05-18 23:09:34 -04:00
Slava Pestov f70d89b145 Fixing fallout from sequences.generalizations change 2010-05-18 22:59:07 -04:00
Slava Pestov c0f39aa99d Move remaining sequence operations from generalizations to sequences.generalizations where they belong 2010-05-18 18:36:47 -04:00
Joe Groff 40c75a996e math.vectors.simd.intrinsics: fix scalar fallback for (simd-vshuffle2-elements) 2010-05-14 02:47:39 -07:00
Joe Groff 349397e67c math.vectors, math.vectors.simd: add user-facing vshuffle2 word 2010-05-14 02:47:05 -07:00
Joe Groff f202c97b52 math.vectors.simd.intrinsics: (simd-vshuffle2-elements) intrinsic that creates a vector by selecting elements from two input vectors. use ##shuffle-vector-halves-imm to implement for double-2s with SSE 2010-05-14 01:16:29 -07:00
Slava Pestov 4ad32f53fe math.vectors.simd.cords: implement new-sequence and like methods on cords to make cross product work 2010-05-13 21:55:19 -04:00
Slava Pestov d2d466de29 Language change: tuple slot setter words with stack effect ( value object -- ) are now named FOO<< instead of (>>FOO) 2010-05-06 17:21:02 -04:00