Commit Graph

1115 Commits (36b2ac97efd94119dbf0aa8618ae6c68265a43b8)

Author SHA1 Message Date
John Benediktsson 4f046a2339 math.vectors: separate "dot product" from "Hermitian inner product". Fixes #484. 2012-03-29 10:56:39 -07:00
John Benediktsson 7a07e8742c math.combinatorics: fix tests for next-permutation. 2012-03-02 10:05:57 -08:00
John Benediktsson 7bb807d441 math.combinatorics: fix docs for next-permutation. 2012-03-02 09:55:22 -08:00
John Benediktsson 8d56193edd math.combinatorics: implementing "next-permutation". 2012-03-02 09:54:35 -08:00
John Benediktsson de74b98278 math.vectors: fix some $examples in docs. 2011-12-29 17:31:55 -08:00
Joe Groff aa1ad21d72 fix help-lint failures 2011-12-14 11:33:17 -08:00
Joe Groff fe767253a1 math.vectors: add higher-order stack effect to vif 2011-12-13 19:46:44 -08:00
Joe Groff 3deae96995 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 abc953ecea help-lint fixes for recent changes 2011-12-07 12:26:35 -08:00
Joe Groff 8cb78d5bd2 math.complex: pass tests even if number-base set 2011-11-26 17:46:38 -08:00
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
Joe Groff 54dcd8a4ea 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 dd8bb5b673 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 248066c710 code beautification 2011-11-13 16:10:26 -08:00
Joe Groff a10fa68218 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 32b7dc116f 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 dd8dda4f48 math.vectors.simd: make vcount work for all ints 2011-11-13 16:10:23 -08:00
Joe Groff 5411a67b22 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 da81cb9035 math.bitwise: don't count the same bits over&over 2011-11-13 16:10:22 -08:00
Joe Groff 706c9ee3b9 math.bitwise: hotrod nonintrinsic fixnum-bit-count 2011-11-13 16:10:21 -08:00
Joe Groff d79b462f75 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 60f928ddbf math.functions: flushable and foldable don't do anything on inline words because flushable and foldable work on call sites (#call nodes), and inlined words are inlined into another word's call site; they don't generate their own #call node. 2011-11-06 19:25:53 -08:00
Doug Coleman c731dc6edb Rename lookup to lookup-word. 2011-11-06 16:00:00 -08:00
Joe Groff 8cf18d1a82 remove BSD,solaris,etc. misc platform support code 2011-11-02 17:13:51 -07:00
Joe Groff 38a5184fdf math.statistics: fix stack effect on collect-by 2011-11-02 13:23:13 -07:00
Doug Coleman 94db86a6db 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 b31ffdfcb4 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 51c033a1f6 Fix all failures in the linux64 build email 2011-10-24 19:33:09 -07:00
John Benediktsson fb2aab3545 Remove unused words. Fixes #132. 2011-10-19 11:01:16 -07:00
John Benediktsson 80e1c8e3f2 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
John Benediktsson cf54ce8e42 math.functions: when gcd is inlined, "gcd nip" is almost as good as "gcd*". 2011-10-18 10:30:39 -07:00
John Benediktsson 38a54cb8df math.functions: improve stack effect names for gcd*. 2011-10-17 20:37:36 -07:00
John Benediktsson ac98269f53 math.functions: faster gcd means faster ratios. 2011-10-17 20:36:28 -07:00
John Benediktsson 81714b8dc3 More lint cleanups. 2011-10-16 19:33:16 -07:00
John Benediktsson 6f1c44b46d Cleanup some lint warnings. 2011-10-15 19:19:44 -07:00
John Benediktsson cc49bbfb27 math.bitwise: bits is clearer this way. 2011-10-14 13:54:08 -07:00
Doug Coleman 181f11faa8 Make M\ throw an error upon lookup failure. Change method -> ?lookup-method, lookup-method is the throwing version of ?lookup-method. Fixes #229. 2011-10-03 15:49:49 -07:00
Doug Coleman f4da6f366c Make histogram example unchecked since hashtables print differently now that hashcodes are more optimized 2011-10-02 22:21:12 -07:00
John Benediktsson 3b72b641e0 Fix help-lint errors for recent hashtable changes. 2011-10-02 17:49:11 -07:00
Doug Coleman 76580da5d5 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 4f42c72012 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
Joe Groff 81b12adcad math.blas, alien.fortran: move to unmaintained cuz I'm getting too old for this shit. closes #171 2011-09-24 20:59:21 -07:00
Joe Groff 954bf89c40 math.functions: clean up some more to trim back load-time dependencies; alter tests to avoid inexact float constants where possible and hex-ify inexact constants otherwise 2011-09-22 16:04:49 -07:00
John Benediktsson 96c710a7b7 math.functions: inline 'on-bits' per Joe Groff's suggestion. 2011-09-22 13:44:30 -07:00
John Benediktsson aa880f46ca math.functions: rename 'bignum-log-helper'. 2011-09-22 12:38:33 -07:00
John Benediktsson 820b54d0f7 math.functions: duplicate on-bits to avoid circular dependency on math.bitwise. 2011-09-22 12:23:16 -07:00
John Benediktsson 90dbb84663 math.functions: test log with negative (really) bignums. 2011-09-22 11:15:06 -07:00
John Benediktsson 7f4604318a math.functions: add forgotten imports and fix between? check. 2011-09-22 10:00:22 -07:00
John Benediktsson 077ef8ed5b math.functions: implement "frexp" and support log of really big numbers. Fixes #160. 2011-09-22 09:42:28 -07:00
Doug Coleman eedc1e185f Add more unit-tests and docs for math.bitwise. Fix a bug with >signed so that it truncates a number to however many bits you tell it the number is before doing the calculation. 2011-09-21 14:55:50 -05:00
John Benediktsson b653360299 math.primes.safe: fix docs. 2011-09-12 10:56:39 -07:00
Joe Groff 003271f2b8 math.statistics: declare polymorphic effects on sequence>* combinators now that #88 is fixed 2011-09-09 18:13:17 -07:00
Joe Groff c57c26b3be math.statistics: add higher-order stack effect annotations to sequence>* words; factor out a "histogram-by" word from "histogram" that takes an additional binning quotation 2011-09-08 19:07:33 -07:00
John Benediktsson 9f34c9c676 Spelling fixes to documentation. 2011-08-26 16:20:31 -07:00
Joe Groff efe79cf6d3 math.functions: make sure zero zero ^ is always nan, regardless of the type of zero 2011-08-01 10:26:53 -07:00
Joe Groff 40c45e08ca Merge remote branch 'erikc/master' 2011-06-13 11:28:02 -07:00
Joe Groff b6cf76b547 Merge branch 'master' of factorcode.org:/git/factor 2011-06-07 09:44:35 -07:00
Joe Groff e4b1417dd2 math.functions: fix documentation for 10^ 2011-06-06 16:27:56 -07:00
Erik Charlebois 64252dbdbc 32 and 64 bit Linux PPC support 2011-05-23 23:36:14 -04:00
Erik Charlebois 305dcf1551 Use .factor-rc etc on Windows too, files can begin with dots just fine 2011-05-23 23:36:13 -04:00
Samuel Tardieu 23fe76160a Add math.primes:nprimes 2011-05-20 12:38:27 +02:00
Slava Pestov d58555d6f5 Merge branch 'cleanup' of git://github.com/mrjbq7/factor 2011-05-06 20:27:59 -07:00
John Benediktsson 1778757fa2 Update references to "1 tail" to use "rest". 2011-05-03 20:50:23 -07:00
John Benediktsson eb6c986cd6 Merge branch 'master' into sorting
Conflicts:
	basis/heaps/heaps-tests.factor
2011-04-12 18:09:36 -07:00
Doug Coleman 7aa7b08d42 Change how sequence>assoc and friends work. Now they take two quotations, the first of which prepares the key/value pair and the second insert it into the assoc. mrjbq7's group-by, formerly collect-values, is now called collect-by. 2011-04-09 23:51:14 -05:00
John Benediktsson d58bc08aa0 Update code that did ">alist sort-" to just "sort-". 2011-04-07 09:01:21 -07:00
Doug Coleman 979e487fef Merge branch 'master' of git://factorcode.org/git/factor 2011-02-26 11:44:50 -06:00
Keita Haga 5a71a0d671 math.combinatorics: fix typo in docs 2011-02-20 03:08:01 +09:00
Doug Coleman fd7e5ffee8 More efficient polyval algorithm in math.polynomials 2011-02-12 22:41:13 -06:00
Keita Haga 073eda332a In several documentation, remove whitespace before or after the colon or period 2011-02-10 01:51:13 +09:00
Keita Haga 5043611252 math.polynomials: fix typo in description of pextend-conv word 2011-01-18 23:35:52 +09:00
Keita Haga cb06cba857 math.statistics: in some words, interchanging the positions of the $examples and a $description 2011-01-18 23:20:06 +09:00
Keita Haga 8b1fbbf3b7 math.statistics: fix a few typos in docs 2011-01-18 22:32:45 +09:00
Keita Haga e8ce62c64e math.intervals: fix some typos in docs 2011-01-18 21:18:35 +09:00
Keita Haga 8d2ceda8f3 assocs, math.bitwise: remove first blank line and useless whitespace in a few usage examples 2011-01-17 00:12:28 +09:00
Keita Haga 92b9b92f38 math.libm: add missing right parenthesis in description of fexp word 2011-01-16 10:48:06 +09:00
Jon Harper f60f13c675 math.primes.erato doc fixes. 2010-11-02 17:34:28 +01:00
Rupert Swarbrick cd28c7a219 math.primes.erato: Fix off-by-one error
The sieve bit vector deals with numbers in chunks of 30. Therefore,
the number 90 (say) is the 91st 'element' of the vector. Each byte
deals with some range {0,1,...,29}+30n so to have the number 90, you
need four bytes.

Rather pleasingly, I bumped into this bug and it reduced to the
incantation:
  2010 2010 sieve marked-prime?
2010-11-02 17:34:24 +01:00
Doug Coleman 67c37591ca Remove <uint> *uint and friends. Hopefully remove the last usages of these words 2010-10-25 15:54:42 -05:00
Slava Pestov ee1520f683 math.primes.erato: fix typo in docs 2010-10-22 18:26:08 -07:00
Slava Pestov 04be762fac math.rectangles: add infinite recursion check in case somebody does something stupid 2010-09-16 21:27:18 -07:00
Slava Pestov 1818bcb780 Fix three problems discovered by running math.floats.env tests in a loop:
- Crash if allocating error triggers a GC from a signal/SEH handler
- Crash if GC runs with floating point traps enabled on Windows
- Floating point traps didn't prettyprint properly
2010-09-02 22:57:14 -05:00
Slava Pestov 720d634388 math.floats.env.x86: make sure the x87 stack is cleared after the overflow test, otherwise random things screw up later 2010-08-28 12:01:09 -05:00
Slava Pestov 6e0cb74b13 math.vectors.simd: docs mention obsolete 'test-mr mr.' words 2010-08-20 18:00:03 -07:00
Slava Pestov 1985705413 compiler: now that FFI has been deconcatenatized, we no longer need the special ##unary-float-function and ##binary-float-function fastpaths 2010-08-13 23:59:19 -07:00
Joe Groff 7384793287 math.floats.env.x86: more direct test for stack fault detection 2010-08-13 22:20:16 -07:00
John Benediktsson ae17190909 math.combinatorics: Fixing selections bug with nested sequences. 2010-08-13 14:34:14 -07:00
Joe Groff 8347a9ead8 math.floats.env: detect +fp-x87-stack-fault+ during collect-fp-exceptions block 2010-08-12 23:23:00 -07:00
Slava Pestov 42b858b3f0 math.libm: fix regression: fsqrt intrinsic was not working ever since change was made to inline FUNCTION: bodies 2010-08-12 21:41:57 -07:00
Jon Harper 4fcdb2fbd5 divisors returns empty list for 0
This is mainly for consistency with other words
(factors, group-factors, unique-factors)
2010-08-09 22:54:35 -07:00
Slava Pestov 68da8c48d5 Merge branch 'master' of http://github.com/mrjbq7/factor 2010-07-26 15:10:50 -04:00
John Benediktsson f1eb6a9d6e math.combinatorics: improve all-subsets and selections words. 2010-07-26 08:12:36 -07:00
Slava Pestov 3dbb8e6153 math.matrices: move normal word from gpu.demos.bunny and reverse sign 2010-07-23 20:41:08 -07:00
Slava Pestov 446ee6896d 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 37bddfba54 math.combinatorics: all-subsets and selections words (contributed by John Benediktsson) 2010-07-14 09:10:51 -07:00
Joe Groff 8323d7c3ac math.polynomials: unclip drop => rest 2010-07-05 20:53:24 -07:00
Joe Groff c6fd20b107 math.polynomials: update pdiff for no-integers-as-sequences (reported by rswarbrick) 2010-07-04 09:23:43 -07:00
Joe Groff 28a56df0da math.quaternions: typo in n*q 2010-06-17 19:23:52 -07:00
Joe Groff 15c63aacb9 math.vectors.simd.cords: add regression test for >A 2010-06-15 22:44:15 -07:00
Joe Groff e10d4f39ee 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 e4d6611070 Merge branch 'for-slava' of git://git.rfc1149.net/factor 2010-06-11 20:10:07 -04:00
Slava Pestov 3dabdcbdc3 mirrors: rename enumerated-sequence to inspected-sequence 2010-06-11 17:14:15 -04:00
Samuel Tardieu b3a866173a Fix "primes-between" and "primes-upto" with pathological bounds.
"primes-between" was buggy when bounds were given in the wrong order
or when the high bound was smaller than 3.
2010-06-11 16:07:52 +02:00
Joe Groff 1041ad5f9b math.vectors.simd.intrinsics: use unrolled loops for some software fallbacks 2010-05-24 18:39:06 -07:00
Joe Groff 60b20d590a math.vectors.simd.intrinsics: remove call( -- ) wrapper from fallbacks 2010-05-24 12:58:14 -07:00
Joe Groff 8d66b14e59 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 af83a9341c 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 ba7cb61133 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
Doug Coleman bdecd564a3 Use keys/values where appropriate 2010-05-21 12:48:04 -05:00
Slava Pestov a8098e3182 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 e30a429985 Fixing fallout from sequences.generalizations change 2010-05-18 22:59:07 -04:00
Slava Pestov ea726f5680 Move remaining sequence operations from generalizations to sequences.generalizations where they belong 2010-05-18 18:36:47 -04:00
Slava Pestov 5b48cd2a63 FFI rewrite part 5: return value boxing and callback parameter boxing now uses vregs; simplify return value unboxing 2010-05-16 03:43:23 -04:00
Joe Groff 7c6c4ef8ae math.bitwise: factor M\ fixnum (bit-count) to a separate word so it can be made intrinsic 2010-05-15 13:27:26 -07:00
Joe Groff 8f1751cd54 math.vectors.simd.intrinsics: fix scalar fallback for (simd-vshuffle2-elements) 2010-05-14 02:47:39 -07:00
Joe Groff 2744816209 math.vectors, math.vectors.simd: add user-facing vshuffle2 word 2010-05-14 02:47:05 -07:00
Joe Groff 9f9e145819 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 fe30355ec7 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 627295f094 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
Slava Pestov 60299f6d74 Eliminate some -rot from the codebase 2010-05-03 18:31:01 -04:00
Slava Pestov 38bafd2be8 compiler.cfg.linear-scan.assignment: spill slot representation logic was backwards, just like Factor 2010-05-03 17:34:29 -04:00
Doug Coleman f67c62b0e4 Fix help lint for math.polynomials 2010-04-30 14:04:45 -05:00
Doug Coleman e15c02f308 Clean up math.polynomials some 2010-04-30 08:42:29 -05:00
Slava Pestov cea21f6a3d math.vectors: (vmerge) shouldn't be generic 2010-04-29 02:28:05 -04:00
Slava Pestov 4ee9e5336f math.vectors.simd.cords: a dash of inline sauce 2010-04-29 01:58:56 -04:00
Joe Groff 0ab9046300 rename half-floats vocab to math.floats.half 2010-04-28 15:48:47 -07:00
Daniel Ehrenberg aa6158b366 Changing require-when usages to the new syntax for require-when 2010-04-18 14:29:24 -05:00
Joe Groff 1dadc4efed Merge branch 'master' of git://factorcode.org/git/factor 2010-04-14 13:16:08 -07:00
Joe Groff efbc3033da math.libm: use FUNCTION-ALIAS: 2010-04-14 12:25:22 -07:00
Slava Pestov da6bcbedfc Replace 'untested' tag with 'not loaded' and 'not tested' tags 2010-04-13 18:43:01 -07:00
Joe Groff ef884ef7f2 Merge branch 'master' into abi-symbols 2010-04-01 15:28:36 -07:00
Doug Coleman 026499e64f Use flags{ instead of flags all over the place 2010-04-01 14:44:03 -05:00
Joe Groff 4fd61f0b5c cpu.architecture: alter param-regs to take abi as an (ignored for now) argument 2010-04-01 02:53:40 -07:00
Joe Groff 65c3259761 "cdecl" -> cdecl 2010-03-31 19:20:35 -07:00
Doug Coleman b39e3f4700 Link a word in math docs 2010-03-31 15:09:51 -05:00
Daniel Ehrenberg 4af88ff9ff Making more vocabs use require-when 2010-03-18 01:39:30 -04:00
Daniel Ehrenberg eb060443db Updating code to use require-when rather than vocab [ require ] when 2010-03-18 01:13:37 -04:00
Daniel Ehrenberg 512fe14e4e Merge branch 'bags' of git://github.com/littledan/Factor
Conflicts:

	basis/compiler/cfg/ssa/construction/tdmsc/tdmsc.factor
	basis/furnace/auth/auth.factor
	basis/stack-checker/backend/backend.factor
2010-03-16 13:28:00 -04:00
Joe Groff e7968ceffc mop up compiler errors from macosx load-all 2010-03-09 00:56:07 -08:00
Joe Groff 191ac353fd generalize stack effects so we can bootstrap with the stricter stack effect checking 2010-03-08 23:38:10 -08:00
Daniel Ehrenberg 434605c0b5 Changing some uses of prune to use members 2010-02-27 13:14:03 -05:00
Erik Charlebois cebabdc323 Add perp and angle-between words for vectors. Fix bug in cross product and add unit tests. 2010-02-25 16:46:02 -08:00
Slava Pestov 7826543d2e sequences: add cartesian-each, cartesian-map, cartesian-product words to eliminate some duplication throughout the codebase 2010-02-25 20:54:57 +13:00
Slava Pestov af0ddd5985 Specialized arrays, structs and other objects responding to the >c-ptr / byte-length protocol can now be written to binary streams 2010-02-24 20:18:41 +13:00
Joe Groff 92e1ca8b61 math.blas: update string c-types 2010-02-21 16:49:58 -08:00
Slava Pestov 95bfc8a240 vocabs.metadata: replace unportable tag with a platforms.txt file for more fine-grained control. Rename unportable tag to untested for remaining cases 2010-02-20 13:30:49 +13:00
Slava Pestov 220dd88a2c Update documentation for new help lint check 2010-02-19 12:31:52 +13:00
Slava Pestov ff172f4132 Make specialized arrays and SIMD types final so that typed can unbox them 2010-02-18 02:39:40 +13:00
Joe Groff 08a20f9478 math.blas.config: add deploy-blas? variable 2010-02-16 13:38:29 -08:00
Slava Pestov f01487eb83 A few documentation fixes 2010-02-17 00:05:36 +13:00
Slava Pestov 361de6c470 math.points: move to extra 2010-02-16 15:29:02 +13:00
Slava Pestov 4893ebf183 Small cleanups 2010-02-16 04:04:09 +13:00
Erik Charlebois 8f86cc6e51 Made p^ more efficient by repeated squaring instead of repeated multiplication 2010-02-13 19:47:44 -08:00
Erik Charlebois 52230d6c4d Add p^ to polynomial vocab for exponentiation of polynomials 2010-02-13 02:35:09 -08:00
Slava Pestov 6e34de5588 math.functions: clean up 2010-02-10 15:04:58 +13:00
Slava Pestov 48373a6c4c Remove math.floats.parser now that its no longer needed 2010-02-08 16:52:29 +13:00
Slava Pestov 38ca12e9d8 math.floats.parser: new vocabulary with old string>float word 2010-02-08 08:32:13 +13:00
Slava Pestov db4a1f7536 Fix unit test for math.parser change 2010-02-08 08:31:17 +13:00
Joe Groff 60561dd490 math.quaternions: slerp function 2010-02-04 20:08:37 -08:00
Joe Groff 2381e9bf24 quaterion to matrix4 conversion 2010-02-04 11:25:45 -08:00
Joe Groff 4ba8c6e0b5 Merge branch 'master' of git://factorcode.org/git/factor 2010-02-03 21:50:36 -08:00
Slava Pestov 87665c8f40 math.statistics: rename histogram* to histogram! and rename sequence>assoc* to sequence>assoc! 2010-02-03 23:11:33 +13:00
Joe Groff 8cf05e9909 vector-friendlier math.quaternions 2010-02-02 00:30:21 -08:00
Doug Coleman 4a7845e52c Add [1,b) to math.ranges. Use [1,b] in random.sfmt 2010-01-31 14:48:01 -06:00
Slava Pestov 7fe96f3eff math.ranges: doesn't need an equal? method, since sequence doesn't define one, and default tuple equal? is fine for ranges 2010-01-27 19:28:45 +13:00
Slava Pestov f804c9c422 Move compile-call and related words only meant to be used for debugging to compiler.test 2010-01-23 00:39:56 +13:00
Doug Coleman 97668156d9 NetBSD 64 blas abi changed 2010-01-21 05:02:39 -06:00
Slava Pestov 8836ce2581 Fix performance regression in vector ops on specialized arrays, tweak definition of <slice> and 2map-reduce to generate fewer conditionals 2010-01-19 17:48:10 +13:00
Doug Coleman 4e6a5a772f Merge branch 'master' of git://factorcode.org/git/factor
Conflicts:
	core/sequences/sequences-docs.factor
2010-01-14 17:22:02 -06:00
Doug Coleman 9356da6fb3 Fix a few integers-as-sequences in docs 2010-01-14 17:20:43 -06:00
Slava Pestov df40d92216 math.functions: fix memory protection error if exp called on a complex number with a rational real part (reported by prunedtree) 2010-01-15 08:23:48 +13:00
Slava Pestov ad6d8556e0 Change [0,b) usages to iota 2010-01-15 08:05:50 +13:00
Doug Coleman 4c71d71907 random is generic now -- iota random -> random 2010-01-14 12:48:57 -06:00
Slava Pestov df4fb4a3ee Removing integers-as-sequences 2010-01-15 07:15:33 +13:00
Slava Pestov 47a5e96547 Rework min and max so that behavior with floats and NaNs is consistent between generic arithmetic and open-coded float intrinsics 2010-01-13 22:20:16 +13:00
Slava Pestov d84f132589 math.floats.env.x86: split off 32 and 64-bit code into sub-vocabularies 2010-01-07 20:44:28 +13:00
Slava Pestov dd5452053a math.floats.env: don't load cpu.x86.64 on x86.32 2010-01-07 20:13:42 +13:00
Slava Pestov 235f3238f5 Add alien-assembly form for inline assembler, works like alien-invoke except calls a user-supplied quotation instead of generating a subroutine call. Replaces FPU status control, SSE detection and read timestamp routines in vm/cpu-x86.*S 2010-01-07 17:39:22 +13:00
Doug Coleman ae9bca2b1e add MAIN: run-unix-factor to math.primes.factors 2009-12-12 23:39:59 -06:00
Doug Coleman 8b38997e55 better minmax 2009-12-07 17:26:33 -06:00
Doug Coleman 313f70dbd6 Merge branch 'master' of git://factorcode.org/git/factor 2009-12-06 02:28:46 -06:00
Joe Groff 6b9c4254ad move simd operation methods onto simd-128 instead of concrete classes to save image space 2009-12-05 21:19:17 -08:00
Joe Groff 2b2be5f121 Merge branch 'master' of git://factorcode.org/git/factor 2009-12-05 17:18:49 -08:00
Joe Groff 3e40a36c50 fix simd tests 2009-12-05 17:17:16 -08:00
Joe Groff d412845b41 add v*high, v*hs+, vsad, and vavg to simd fuzz tests 2009-12-05 15:42:41 -08:00
Joe Groff af39e5d52c missing USING:s 2009-12-05 15:38:57 -08:00
Slava Pestov 0a5826c123 math.combinatorics: remove 'mirrors' from using list since its not needed 2009-12-05 18:21:32 -05:00
Slava Pestov abe72ae7ae math.vectors.simd: ensure that set-alien-vector is open-coded in the actual set-nth-unsafe method on SIMD specialized arrays, not just inlined instances 2009-12-05 18:20:57 -05:00
Joe Groff 104c29aabc simd intrinsic implementation for v*high, v*hs+, vavg, and vsad 2009-12-05 14:52:18 -08:00
Joe Groff 1845915dc6 add v*high, v*hs+, vavg, and vsad operations to math.vectors 2009-12-05 11:32:31 -08:00
Joe Groff 36b0b65320 move sequence instance to individual SIMD types rather than simd-128 parent type so that "hashcode*" doesn't attempt to use the sequence implementation of hashcode on abstract simd-128 objects 2009-12-04 13:22:59 -08:00
Joe Groff 53ca7f208b update math.vectors docs for simd changes 2009-12-04 13:21:18 -08:00
Doug Coleman 0a48b946b6 Merge branch 'master' of git://factorcode.org/git/factor 2009-12-02 20:11:08 -06:00
Doug Coleman a1bb120498 clean up math.combinatorics and add another combinator 2009-11-27 22:50:06 -06:00
Joe Groff 67cc1c01be Merge branch 'master' into simd-cleanup 2009-11-26 16:14:46 -08:00
Joe Groff 66d0cafa94 fix buggy simd intrinsics 2009-11-26 13:28:40 -08:00
Joe Groff ac5d3d5652 remove SIMDS: 2009-11-26 11:15:46 -08:00
Joe Groff 0795c60b83 "norm" doesn't need to be generic, "norm-sq sqrt" always works 2009-11-26 11:15:35 -08:00
Joe Groff 7da80f65e7 trick math.vectors.simd into making nicer quotations 2009-11-25 20:24:09 -08:00
Joe Groff 4027002db7 remove SIMD:s 2009-11-25 20:21:54 -08:00
Joe Groff 578a0e3fd5 math.vectors.simd.cords vocab that defines vector cords 2009-11-25 18:01:58 -08:00
Joe Groff 46f0aa6421 move cords to sequences.cords 2009-11-24 22:56:42 -08:00
Joe Groff 9128f1f160 remove mentions of 256-bit vectors from math.vectors.simd 2009-11-24 22:26:16 -08:00
Joe Groff 3f5b3c2c1b fix math.vectors.conversion help-lint 2009-11-24 22:20:43 -08:00
Joe Groff d344023b1c update math.vectors.conversion 2009-11-24 20:53:40 -08:00
Doug Coleman 7a00f24d6b revert math.matrices.elimintion until someone fixes it properly 2009-11-24 20:41:59 -06:00
Joe Groff c98eb84943 make math.vectors.simd tests pass again 2009-11-24 18:30:12 -08:00
Joe Groff d94ffe6d78 scalar fallbacks for simd intrinsics 2009-11-23 21:24:55 -08:00
Slava Pestov 0612bc6177 Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Joe Groff 6794d14652 typo 2009-11-19 12:17:14 -08:00
Joe Groff 152b0d2df5 break simd intrinsics into a separate vocab so they can be intrinsified before the simd methods compile 2009-11-19 11:53:46 -08:00
Joe Groff 736be27162 move methods back into simd functor so the intrinsics can compile 2009-11-19 11:29:15 -08:00
Joe Groff c07f3212f9 fix effect of set-alien-vector 2009-11-18 22:18:42 -08:00
Joe Groff a3e4ecfc7d enable simd intrinsics and fix first-pass compiler errors 2009-11-18 20:32:05 -08:00
Joe Groff 243e5b43ce fixes for stronger stack checker 2009-11-14 22:25:00 -06:00
Joe Groff f544982fda Merge branch 'master' of git://factorcode.org/git/factor into simd-cleanup
Conflicts:
	basis/math/vectors/simd/functor/functor.factor
2009-11-14 21:02:39 -06:00
Joe Groff 8a8699ac98 backend fixups 2009-11-14 20:59:03 -06:00
Joe Groff e323071c44 sever lingering dependencies on simd from compiler 2009-11-11 16:08:40 -06:00
Slava Pestov e9a7191050 Fix struct field alignment on PowerPC 2009-11-10 19:34:14 -06:00
Slava Pestov 425e9d0dde Fix some test failures 2009-11-10 16:48:06 -06:00
Joe Groff 8894e9047c Merge branch 'master' into simd-cleanup 2009-11-07 22:26:09 -06:00
Philipp Brüschweiler 8163c47b4a sequences: rename virtual-seq to virtual-exemplar 2009-11-07 00:06:26 +01:00
Slava Pestov a089163a40 math: fix test failures on 32-bit 2009-11-06 04:50:41 -06:00
Joe Groff 4b0edb34d3 Merge branch 'master' of git://factorcode.org/git/factor 2009-11-05 22:23:21 -06:00
Joe Groff 61d579360d remove non-primitive-related uses of tuck from basis 2009-11-05 17:03:24 -06:00
Joe Groff fa6d7b7069 eliminate spin from basis 2009-11-05 14:05:06 -06:00
Joe Groff 75d04922b9 Merge branch 'master' into simd-cleanup
Conflicts:
	basis/math/vectors/simd/functor/functor.factor
2009-11-05 11:27:08 -06:00
Joe Groff 4d54f27cd1 more intrinsic madness 2009-11-05 09:52:57 -06:00
Doug Coleman 2df2c1a339 Merge branch 'master' of git://factorcode.org/git/factor 2009-11-05 01:58:40 -06:00
Slava Pestov 2b1a26228b Align stack pointer on non-Mac OS X x86-32 platforms, and use aligned loads/stores for SIMD values 2009-11-03 23:51:44 -06:00
Joe Groff b98742be30 typos 2009-11-03 21:38:55 -06:00
Joe Groff 73d2a75644 remove math.vectors .specialization, .simd.functor, .simd.intrinsics 2009-11-02 15:00:39 -06:00
Joe Groff 9cf3ab3da1 redo math.vectors.simd to use generics for specialization 2009-11-02 14:59:07 -06:00
Joe Groff e0ba0c5539 genericize vector ops 2009-11-02 14:21:19 -06:00
Doug Coleman 092dd9fc39 add sorted-histogram word 2009-11-01 23:16:26 -06:00
Joe Groff fab5cbc6b9 fix float integer^ for denormal results 2009-11-01 00:43:04 -05:00
Doug Coleman 89a426d797 fix help lint 2009-10-30 13:35:20 -05:00
Doug Coleman 44acd45f2a move docs for nth-root, fix docs for minmax 2009-10-30 06:37:02 -05:00
Doug Coleman 32a51b584c slightly better math.statistics docs 2009-10-30 03:06:03 -05:00
Doug Coleman 320128c7eb move histogram to math.statistics, write a main article for math.statistics 2009-10-30 02:55:54 -05:00
Doug Coleman 003787113f move nth-root to math.functions, use exchange-unsafe in math.statistics 2009-10-30 02:35:51 -05:00
Joe Groff 1cf45abf06 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-30 00:42:37 -05:00
Joe Groff b858860a67 add ##shl-vector-imm and ##shr-vector-imm insn variants. use merge/shr instead of compare/merge to do signed unpacks 2009-10-30 00:41:19 -05:00
Doug Coleman 1d12a6707d sigma -> map-sum 2009-10-29 14:34:04 -05:00
Joe Groff 3fbe722561 Merge branch 'master' of http://factorcode.org/git/factor
Conflicts:
	basis/locals/locals.factor
	basis/peg/peg.factor
	extra/infix/infix.factor
2009-10-28 16:17:24 -05:00
Joe Groff 6e1bffb1c5 update existing code to use :> ( ) when possible 2009-10-28 16:11:33 -05:00
Doug Coleman bd13e018dd memq? -> member-eq?, sorted-memq? -> sorted-member-eq? 2009-10-28 15:02:00 -05:00
Doug Coleman 7ce4b746e5 parsed -> suffix!, add append! 2009-10-28 13:38:27 -05:00
Slava Pestov 08e7d25dc5 change-each -> map!, deep-change-each -> deep-map! 2009-10-27 22:32:56 -05:00
Slava Pestov 1e13f94e9f math.matrices: remove dead code 2009-10-23 07:01:57 -05:00
Slava Pestov bbedd03f6b mirrors: don't depend on specialized-arrays, it pulls in too much 2009-10-23 04:24:20 -05:00
Joe Groff 84f203afcc math.matrices: vectorizable definition of cross 2009-10-22 16:26:25 -05:00
Doug Coleman 1b4e3cb7a6 fix more docs typos 2009-10-21 18:11:24 -05:00
Doug Coleman 0d4b9132d7 fix a bunch of typos in docs 2009-10-21 17:40:43 -05:00
Joe Groff bedfc8f13c vif combinator 2009-10-20 22:49:20 -05:00
Joe Groff 8a6b0a1453 generate unsigned vector comparison fallbacks using min/max or xor/signed compare 2009-10-20 22:30:57 -05:00
Joe Groff cb36111a3c generate better fallback code for vmin/vmax intrinsics 2009-10-20 19:22:38 -05:00
Joe Groff 6f72c3ca24 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-20 17:42:29 -05:00
Joe Groff 34344be636 clean up vector lerp functions to be better vectorizable 2009-10-20 17:11:22 -05:00
Slava Pestov 248f178e64 math.vectors: fix behavioral difference between generic vector vmin vmax and float specialized versions thereof 2009-10-20 07:06:44 -05:00
Joe Groff b212e8edd0 inline trilerp so that perlin-noise is pretty much instantaneous 2009-10-19 15:11:59 -05:00
Joe Groff b411f1701a make vshuffle-bytes intrinsic for any shuffle mask type 2009-10-19 12:25:55 -05:00
Joe Groff fca550d567 math.vectors.conversion docs 2009-10-18 21:25:09 -05:00
Joe Groff 2a156795c5 update vshuffle docs 2009-10-18 16:34:44 -05:00
Joe Groff 0653bae7ec scuttle bogus math.vectors.simd test 2009-10-17 18:47:31 -05:00
Joe Groff b9d2c068a4 fix sporadic "fall-through in cond" failure in float math.vectors.simd tests 2009-10-17 16:54:51 -05:00
Joe Groff 421b61f0e8 fix type propagation information put on non-SIMD specializations of vany?, vall?, vnone? 2009-10-17 11:21:08 -05:00
Joe Groff 7f001ee312 make hlshift/hrshift simd tests endian agnostic 2009-10-17 00:34:35 -05:00
Slava Pestov 4ed91ff5ee syntax: fix docs for : 2009-10-16 23:45:10 -05:00
Joe Groff dd6308ead5 improve error reporting of failing simd fallbacks 2009-10-16 16:34:26 -05:00
Joe Groff 448ef2f1d5 fix unsigned vector unpack 2009-10-16 14:25:33 -05:00
Slava Pestov 48f4799505 math.vectors.simd: fix typos in docs reported by Ed Swartz 2009-10-13 05:13:22 -05:00
Joe Groff 588899a1b3 fix fallbacks for vall?, vany?, vnone? 2009-10-10 13:01:13 -05:00
Joe Groff 1407804393 change the simd-struct tests to cover integer vector slots 2009-10-10 12:23:25 -05:00
Joe Groff d9002127fa have vshuffle accept simd-128 variable byte shuffles 2009-10-10 11:30:11 -05:00
Joe Groff 3bc097f6ff rename ##shuffle-vector to ##shuffle-vector-imm, and add a new ##shuffle-vector for dynamic shuffles. have vshuffle use ##shuffle-vector to do word and byte shuffles on x86 2009-10-09 21:26:27 -05:00
Joe Groff 471c86a110 generate better code for vabs when instruction isn't available instead of using software fallback (-0.0 andn for floats, x > 0 ? x : -x for signed ints, nop for unsigned ints) 2009-10-09 14:24:55 -05:00
Joe Groff 01f5d392be implement vneg as an intrinsic in terms of load -0, subtract 2009-10-09 13:16:39 -05:00
Joe Groff 07aa2620c6 add SIMDS: ... ; and SPECIALIZED-ARRAYS: ... ; syntax 2009-10-09 10:43:37 -05:00
Joe Groff 1bb8a99368 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-08 11:37:12 -05:00
Joe Groff 531cfa1c33 refactor math.vectors.conversion 2009-10-08 11:35:40 -05:00
Doug Coleman e758d4061a Merge branch 'master' of git://factorcode.org/git/factor 2009-10-07 20:53:04 -05:00
Joe Groff f2c9eb79e2 decompose %unpack-vector-head/tail into %compare-vector/%merge-vector-head/tail or %tail>head-vector/%unpack-vector-head insns when there isn't an actual unpack insn; get rid of fake x86 implementations 2009-10-07 14:09:46 -05:00
Doug Coleman 901f87e752 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-07 12:47:44 -05:00
Joe Groff 47cfb7d3a5 fix ##load-constant/##scalar>vector folding when constant is a fixnum 2009-10-07 12:46:08 -05:00
Doug Coleman 59c1f3f73e Merge branch 'master' of git://factorcode.org/git/factor 2009-10-07 12:33:44 -05:00
Joe Groff 34def34481 don't generate a ##not-vector instruction if the cpu doesn't have one; instead, fall back to a ##fill-vector/##xor-vector combo. get rid of pretend %not-vector in cpu.x86 2009-10-07 11:59:36 -05:00
Joe Groff 8873b7939a fix math.vectors.simd test load failure 2009-10-07 11:56:57 -05:00
Doug Coleman bfb2493d68 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-07 11:52:34 -05:00
Joe Groff 4d4da7ac23 break vector conversion intrinsics off to a math.vectors.conversion.backend vocab so the whole conversion vocab doesn't get sucked in by the compiler 2009-10-06 21:28:33 -05:00
Joe Groff a319dde8b5 add some math.vectors.conversion tests to cover some failing cases 2009-10-06 20:21:08 -05:00
Joe Groff 785f8620fd glue conversion intrinsics to instructions 2009-10-06 20:13:38 -05:00
Joe Groff 4456b1f3f9 assert that vconvert's inputs are of the right type 2009-10-06 17:42:36 -05:00
Joe Groff 166ea6bc10 math.vectors.conversion vocab with primitive words (to be mapped to intrinsics soon) and a super all-in-one "vconvert" macro wrapping the whole thing 2009-10-06 14:37:16 -05:00
Doug Coleman b56880bfd7 fix a bug in bit-count that assumed 32bit fixnums, make bit-count work on byte-arrays, SIMD types, specialized-arrays, and aliens 2009-10-05 18:55:26 -05:00
Joe Groff fbe810fc3b rename SIMD vmerge and kids to (vmerge), make new vmerge more generally useful 2009-10-05 17:55:39 -05:00
Joe Groff cf4df7eb66 typo in vmerge-head, vmerge-tail docs 2009-10-05 11:14:14 -05:00
Joe Groff 7ed8f00b0f go back to using random instead of uniform-random-float in math.vectors.simd tests because the software and SIMD implementations of norm and v. can sporadically diverge when their different operation orders lead to cancellation of catastrophically small inputs 2009-10-03 22:57:04 -05:00
Joe Groff 626954a071 fix v? software fallback 2009-10-03 22:37:45 -05:00
Joe Groff 0c9c3d4859 add %merge-vector-head and %merge-vector-tail instructions to back vmerge 2009-10-03 21:48:53 -05:00
Joe Groff 05c722ea0c link vmerge into math.vectors docs 2009-10-03 21:48:16 -05:00
Joe Groff d3c51baf91 software version of vmerge word (to be backed by UNPCK instructions on x86 and VMRG instructions on ppc) 2009-10-03 20:22:37 -05:00
Joe Groff 9e61c433f1 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-03 11:48:56 -05:00
Joe Groff 426e560a6b sprinkle some NaNs onto math.vectors.simd fuzz tests to improve flavor 2009-10-03 11:47:02 -05:00
Joe Groff 04bb03bb61 add intrinsics for v<=, v<, v=, v>, v>=, vunordered? 2009-10-03 11:29:34 -05:00
Slava Pestov 8a7e9740c9 math.floats.env: disable trap tests on OpenBSD i386 for now, until The World's Most Secure Operating System fixes a local DoS exploit 2009-10-03 10:59:54 -05:00
Joe Groff 38f413a8a6 add intrinsic for vnot/vbitnot 2009-10-02 20:04:28 -05:00
Doug Coleman 7d005111a4 i messed up a merge. weird 2009-10-02 16:05:00 -05:00
Doug Coleman a070e9a3a9 Merge branch 'master' of git://factorcode.org/git/factor into klazuka
Conflicts:
	basis/math/vectors/vectors-docs.factor
2009-10-02 15:59:19 -05:00
Doug Coleman 67167cf9ea Merge branch 'docs' of git://github.com/klazuka/factor into klazuka
Conflicts:
	basis/math/vectors/vectors-docs.factor
2009-10-02 15:58:45 -05:00
Joe Groff f93dcfc792 give math.vectors shuffle words their own docs subsection in anticipation of having more ops in there 2009-10-02 15:37:49 -05:00
Joe Groff 5ff3eef0df proofreading math.vectors docs 2009-10-02 15:18:42 -05:00
Joe Groff 0821d3f370 add notes to math.vectors docs about simd booleans 2009-10-02 15:11:06 -05:00
Joe Groff aa3392e50f implement vand, vor, vandn, and vxor as bitwise intrinsics for simd types 2009-10-02 14:17:01 -05:00
Keith Lazuka 405e5d015b docs: change $subsection to $subsections 2009-10-02 12:15:48 -04:00
Joe Groff 8b7a813a08 change vector logical words to reuse the input sequence types so that they work as simd fallbacks 2009-10-01 23:49:53 -05:00
Joe Groff 01736e9bec define simd equal? methods as v= vall? 2009-10-01 23:46:37 -05:00
Joe Groff 53b265f682 Merge branch 'master' of git://factorcode.org/git/factor
Conflicts:
	basis/compiler/codegen/codegen.factor
2009-10-01 23:14:16 -05:00
Joe Groff 952498ef69 create special intrinsic wrappers for 256-vector>scalar operations so that vall?, vany?, vnone? work on 256-vectors 2009-10-01 23:07:10 -05:00
Joe Groff d5c4ec5357 add tests for v=, vany?, vall?, vnone? 2009-10-01 21:24:14 -05:00
Joe Groff d14f150b58 %test-vector instruction for vany?, vall?, vnone? 2009-10-01 15:35:38 -05:00
Joe Groff 987ced4070 %compare-vector instruction (only does v= for now) 2009-10-01 14:31:37 -05:00
Joe Groff 0c8a4717f2 add software vall?, vany?, vnone? words 2009-10-01 13:21:10 -05:00
Slava Pestov 0db97d536f math.vectors.simd.functor: don't open-code simd-nth and simd-with if we cannot generate double precision FP code. Should fix illegal instruction trap on CPUs with only SSE1 2009-10-01 07:36:50 -05:00
Joe Groff 5ac5a74cc6 write v? and vmask in terms of bitwise ops 2009-10-01 00:09:25 -05:00
Joe Groff a93f8f66f9 Revert "add a %blend-vector intrinsic for v?"
This reverts commit 21e4b28b67.
2009-09-30 23:40:37 -05:00
Joe Groff 67cc45235d Merge branch 'master' of git://factorcode.org/git/factor 2009-09-30 23:04:04 -05:00
Joe Groff 7db7b63552 add a %blend-vector intrinsic for v? 2009-09-30 23:03:59 -05:00
Slava Pestov 2384b630b2 math.vectors.simd: use fallbacks for hlshift, hrshift, vshuffle if parameter is not a literal;al; element access in int-4 on x86-64 now sign-extends the value; don't throw error at compile time if parameter for vshuffle does not have enough elements 2009-09-30 20:04:37 -05:00
Joe Groff e56cd5cc12 accept f and t as elements of literal simd vectors, storing binary all-zeroes or all-ones 2009-09-30 19:04:02 -05:00
Joe Groff e0f3b72c65 break math.vectors docs into subsections 2009-09-30 13:21:25 -05:00
Joe Groff 7e679e1683 Merge branch 'master' of git://factorcode.org/git/factor 2009-09-30 00:07:45 -05:00
Joe Groff 55ab9c3002 docs for new math.vectors logical ops 2009-09-30 00:07:37 -05:00
Slava Pestov d70b95e4b8 math.vectors.simd: fix bad comparison logic in unit tests 2009-09-29 23:46:21 -05:00
Slava Pestov 0a29e64287 math.functions: ~ now raises an invalid operation FP trap if one of the inputs is NaN 2009-09-29 23:41:08 -05:00
Slava Pestov eeb601dade Merge branch 'master' of git://factorcode.org/git/factor 2009-09-29 22:59:58 -05:00
Slava Pestov 80e84a357d math.vectors.simd: add vbroadcast intrinsic, fix integer overflow issues 2009-09-29 22:58:20 -05:00
Joe Groff 1e1072f540 math.matrices.simd versions of frustum-matrix4 and rotation-matrix4 2009-09-29 22:54:11 -05:00
Joe Groff 5e16592596 add a "vmask" vector op to selectively zero out elements 2009-09-29 18:10:36 -05:00
Slava Pestov f395d83379 math.vectors.simd: add fast intrinsic for 'nth', replace broadcast primitive with shuffles 2009-09-29 04:48:11 -05:00
Slava Pestov e40a95c1e1 math.vectors.simd: add vshuffle intrinsic 2009-09-28 23:12:13 -05:00
Slava Pestov a8ea929ad9 Work in progress 2009-09-28 17:31:34 -05:00
Slava Pestov 48d3f10c81 Fix some load errors in various places 2009-09-28 16:33:39 -05:00
Slava Pestov 4abfe06b51 Fixing various test failures caused by C type parser change, and clarify C type docs some more 2009-09-28 08:48:39 -05:00
Slava Pestov 9a06e6f424 math.vectors.simd: add intrinsic for int-4-boa, uint-4-boa, fix tests for C type parser change, fix software fallback for horizontal shifts 2009-09-28 06:34:22 -05:00
Slava Pestov 790611666c Merge branch 'master' of git://factorcode.org/git/factor 2009-09-28 02:19:05 -05:00
Slava Pestov b2ea3afd84 math.vectors.simd: add hlshift, hrshift (128-bit shift), vbitandn intrinsics 2009-09-28 02:17:46 -05:00
Joe Groff a14855b98a Merge branch 'master' of git://factorcode.org/git/factor 2009-09-27 22:21:42 -05:00
Joe Groff 24de21eac8 take a shot at making other platform vocabs c-type-string-free 2009-09-27 19:25:34 -05:00
Slava Pestov afc7a20ab8 Merge branch 'master' of git://factorcode.org/git/factor 2009-09-27 17:18:16 -05:00
Slava Pestov 18cf8c37e1 math.vectors.simd: add *-cast words for converting between representations 2009-09-27 17:18:02 -05:00
Joe Groff 630e5ecc3b update vocabs so a load-all on macosx works without parsing c-type strings 2009-09-27 15:11:21 -05:00
Joe Groff c2145c933b software implementations of vector logical ops (vand, vor, vxor, vnot, v</=/>, vunordered?, v?) 2009-09-27 13:19:22 -05:00
Slava Pestov 9d47f5d80d math.vectors: remove special handling for negative shifts, now we just say the behavior of vlshift and vrshift with negative shifts is undefined 2009-09-26 02:26:31 -05:00
Slava Pestov c38d523185 math.vectors: fix SIMD unit tests 2009-09-25 21:44:14 -05:00
Slava Pestov ed37950a33 math.vectors: change vlshift and vrshift to mask the shift count by HEX: ff, to make them behave consistently with their SIMD counterparts 2009-09-25 18:50:44 -05:00
Slava Pestov bbbb207dab Some fixes and cleanups in math.vectors
- Tighten up type inference for operations on complex float arrays
- Fix v. to have correct behavior with complex numbers
- Rename v<< and v>> to vlshift and vrshift to avoid clashing with v>> accessor
2009-09-24 06:58:33 -05:00
Slava Pestov 7b6128dd03 math.vectors.simd: add v<< and v>> intrinsics for bitwise shifts on elements 2009-09-24 03:32:39 -05:00
Slava Pestov 0836e79e66 Fix conflict 2009-09-23 20:52:04 -05:00
Slava Pestov dfc9fd071e Add longlong-2, ulonglong-2, longlong-4, ulonglong-4 SIMD types, fix int-4 multiplication on SSE2 2009-09-23 20:23:25 -05:00
Doug Coleman 402e770296 fix using 2009-09-23 12:47:20 -05:00
Doug Coleman 810bd63820 Merge branch 'master' of git://factorcode.org/git/factor
Conflicts:
	basis/math/vectors/simd/simd-docs.factor
2009-09-23 10:11:49 -05:00
Slava Pestov f017f8904b math.vectors.simd: Improved documentation 2009-09-23 03:14:06 -05:00
Slava Pestov e1efb189a4 math and math.vectors: improved documentation 2009-09-23 03:08:45 -05:00
Slava Pestov 43fa252af5 math.vectors.simd: new operations: vabs vsqrt vbitand vbitor vbitxor 2009-09-23 02:47:14 -05:00
Slava Pestov 15ba7e299b math.vectors.simd: fix all tests 2009-09-23 01:05:19 -05:00
Keith Lazuka bea4aa7662 docs: updated some docs to use new markup 2009-09-22 15:22:34 -04:00
Doug Coleman 51ddc963b8 Merge branch 'master' of git://factorcode.org/git/factor
Conflicts:
	core/generic/generic-tests.factor
2009-09-22 10:25:42 -05:00
Slava Pestov 629fd1fc82 Merge branch 'master' into integer-simd 2009-09-22 03:24:52 -05:00
Slava Pestov fe0701deb1 math.functions: fix ~ with negative (relative) tolerance 2009-09-22 03:19:47 -05:00
Doug Coleman b86314ec39 Merge branch 'master' of git://factorcode.org/git/factor 2009-09-21 17:59:48 -05:00
Slava Pestov 0f0bf667b5 Merge branch 'master' of git://factorcode.org/git/factor into integer-simd 2009-09-21 17:58:24 -05:00
Slava Pestov 962d039852 Rename specific-method to method-for-class, rename (effective-method) to method-for-object, and make both much faster 2009-09-21 17:42:20 -05:00
Slava Pestov ea44ea3522 math.vectors.simd: add saturated arithmetic operations 2009-09-20 23:16:02 -05:00
Doug Coleman 5cb34724b7 Merge branch 'master' of git://factorcode.org/git/factor
Conflicts:
	basis/classes/struct/struct-tests.factor
	basis/functors/functors-tests.factor
	basis/specialized-arrays/specialized-arrays-tests.factor
2009-09-20 23:02:49 -05:00
Doug Coleman eceed177d6 replace usages of <" with """ 2009-09-20 22:42:40 -05:00
Slava Pestov acea55c692 math.vectors: add v+- word which is accelerated by SSE3 2009-09-20 17:43:16 -05:00
Slava Pestov 47d8763340 More integer SIMD work
- move generated vocab support from specialized-arrays to vocabs.generated
- add fuzz testing to math.vectors.simd
- add alien type support for integer SIMD vectors
- SIMD: parsing word generates a SIMD type, instead of pre-generating them all in math.vectors.simd
2009-09-20 16:48:17 -05:00
Slava Pestov e77341b90c math.vectors.simd: redesign to be more flexible, integer SIMD work in progress 2009-09-20 02:08:32 -05:00
Joe Groff 076ab42dc3 move some allocation words that don't really have much to do with c types out of alien.c-types into a new alien.data vocab 2009-09-17 22:36:05 -05:00
Joe Groff 1f04ed01fe fix more ambiguities 2009-09-17 09:29:23 -05:00
Joe Groff fa60d96ae4 fix "float" ambiguities in math.blas, opengl vocabs 2009-09-16 21:25:46 -05:00
Joe Groff 3b4330fcf6 get things to a point where they bootstrap again 2009-09-15 21:43:18 -05:00
Slava Pestov b03eaf3c32 math: minor doc fixes 2009-09-15 15:42:46 -05:00
Slava Pestov 4f702de449 math.functions: more accurate log10 (fixes problem reported by OneEyed) 2009-09-14 16:19:58 -05:00
Joe Groff 77f0fbf497 missed a few PPC status bits that needed clearing 2009-09-14 15:17:36 -05:00
Joe Groff 2fdb16060b vm-error>exception-flags word to extract exception flag information from a trap exception 2009-09-14 14:10:51 -05:00
Slava Pestov 0cadfcd7eb Merge branch 'master' of git://factorcode.org/git/factor 2009-09-14 02:39:24 -05:00
Slava Pestov c4f3a42269 math.floats.env: Fix linux x86.64 some more 2009-09-14 02:39:12 -05:00
Joe Groff 8fe9bf5429 Merge branch 'master' of git://factorcode.org/git/factor 2009-09-13 23:40:58 -05:00
Joe Groff fb43ae2daf save the FP status out of the signal context and use it as part of the fp trap factor exception. clear the FP status before continuing after an exception 2009-09-13 23:39:12 -05:00
Slava Pestov 05b51d2739 math.floats.env: modify tests to take buggy Linux/x86-64 pow() into account 2009-09-13 23:26:09 -05:00
Slava Pestov abedea0ccb math.functions: loosen tests up a bit since exp(1) on FreeBSD x86/64 differs from e in the last bit 2009-09-13 22:33:12 -05:00
Slava Pestov 3ab6dbac22 math.floats.env: fix compiled trap unit tests 2009-09-13 18:22:49 -05:00
Slava Pestov d14f227905 Merge branch 'master' of git://factorcode.org/git/factor 2009-09-13 00:09:09 -05:00
Slava Pestov 3a61107f1d typos in altivec env 2009-09-12 22:30:11 -05:00
Slava Pestov 32b95c2cdf math: add unordered comparison operators u< u<= u> u>= which behave exactly like < <= > >= except no floating point exceptions are set if one or both inputs are NaNs; also add efficient intrinsic for unordered? predicate, and fix propagation type functions for abs, absq, and bitnot 2009-09-12 22:20:13 -05:00
Joe Groff 53e23de104 set altivec denormal flag when with-denormal-mode is used 2009-09-12 20:39:41 -05:00
Joe Groff 54162af3fe Merge branch 'master' of git://factorcode.org/git/factor 2009-09-12 19:45:47 -05:00
Joe Groff 6d328be69b all-fp-exceptions constant 2009-09-12 18:13:25 -05:00