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
Slava Pestov
1337f82ce6
math.order: better docs
2009-09-12 16:33:42 -05:00
Slava Pestov
51dd22b119
math.floats.env.ppc: fix ppc-fp-traps>bit
2009-09-12 12:57:15 -05:00
Slava Pestov
d5206b26ec
math.floats.env.ppc: fix ppc-fp-traps-bits
2009-09-12 12:49:51 -05:00
Joe Groff
d4ee121750
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-12 09:04:53 -05:00
Joe Groff
df4d1f8dd2
typos in math.floats.env.ppc
2009-09-12 09:03:27 -05:00
Slava Pestov
b61ff44b66
math.vectors.simd: don't run x86-specific tests on PPC
2009-09-11 21:38:40 -05:00
Joe Groff
1be4c3a6a7
typo
2009-09-11 20:31:06 -05:00
Joe Groff
ffcc630601
log1+ word (maps to C99 log1p function)
2009-09-11 20:28:15 -05:00
Slava Pestov
dfb07601fa
Merge branch 'for-slava' of git://git.rfc1149.net/factor
2009-09-10 13:15:18 -05:00
Joe Groff
bda5963c62
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-09 23:38:01 -05:00
Joe Groff
61851fcd7a
take the union of the x87 and sse exception flags when reporting fp-exception-flags. add back the unit tests i took out since this should fix the problem
2009-09-09 23:37:48 -05:00
Slava Pestov
7f2e2b1777
Specialized array overhaul
...
- Replace hand-written specialized-arrays.* subvocabularies with new system; instead of USE:ing specialized-arrays.T, do SPECIALIZED-ARRAY: T
- Ditto for specialized-vectors; use SPECIALIZED-VECTOR:
- io.mmap.functor: removed entirely, use <mapped-array> instead
- struct-arrays and struct-vectors have been removed because specialized arrays and vectors subsume them entirely
2009-09-09 22:33:34 -05:00
Joe Groff
3d49cc5a0d
change math.floats.env tests not to use any libm functions, which don't reliably set the right hardware exceptions on linux glibc
2009-09-09 18:00:38 -05:00
Joe Groff
01b5430fbf
make math.floats.env backends unportable
2009-09-09 17:32:26 -05:00
Samuel Tardieu
d23286a9ef
Do not repeat sanity tests at each iteration
2009-09-09 21:35:24 +02:00
Joe Groff
1c62a978d0
add some tests to help track down leaks in FP state changes
2009-09-08 23:07:33 -05:00
Slava Pestov
74fa73aeaf
Fix various test failures
2009-09-08 19:18:56 -05:00
Slava Pestov
c52ffebffe
math.rectangles.positioning: don't position popups off-screen
2009-09-08 16:23:02 -05:00
Joe Groff
1fcc0875ba
update math.floats.env.x86 for sse detection change
2009-09-08 15:47:03 -05:00
Joe Groff
2ad9459b85
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-08 15:37:32 -05:00
Joe Groff
0ec342a1c5
factor out x86 and ppc backends for math.floats.env; update both x87 and SSE state on x86
2009-09-08 15:36:53 -05:00
Slava Pestov
d596e3abe7
math.vectors.simd: fix help rendering
2009-09-08 14:49:27 -05:00
Slava Pestov
82a8ef7beb
math.vectors.simd: remove useless dependency
2009-09-08 13:55:56 -05:00
Slava Pestov
aa4307765b
Merge branch 'master' into simd
2009-09-08 13:38:14 -05:00
Slava Pestov
f5536bdde0
math.vectors.specialization: specialized vector words are now subwords of the generic vector word. This ensures that specializations get compiled correctly in all cases
2009-09-08 13:37:25 -05:00
Slava Pestov
c707ba5d61
Merge branch 'for-slava' of git://git.rfc1149.net/factor
2009-09-08 13:09:27 -05:00
Slava Pestov
0c936c14ca
Merge branch 'for-slava' of git://git.rfc1149.net/factor into simd
2009-09-08 13:02:00 -05:00
Slava Pestov
38c961cf6f
Fixes
2009-09-08 00:13:18 -05:00
Slava Pestov
bbca00e2ae
Fix conflicts
2009-09-07 23:51:25 -05:00
Joe Groff
e3509e7f11
tighten up math.floats.env docs
2009-09-07 10:50:40 -05:00
Joe Groff
25b45d6af0
test fp traps
2009-09-06 09:04:46 -05:00
Joe Groff
e705470d42
make public words for querying current rounding mode, denormal mode, and trap set
2009-09-06 08:50:54 -05:00
Joe Groff
96db254311
unit tests for math.floats.env
2009-09-06 07:50:56 -05:00
Joe Groff
36ec53a968
math.floats.env vocab with words to control the floating-point environment
...
add some functions to the VM to grab and set the fpu control register
2009-09-05 19:48:13 -05:00
Slava Pestov
a054ec3d64
specialized-arrays.direct is no more; instead, every specialized-array.<foo> vocabulary has a <direct-T-array> constructor
2009-09-04 22:01:55 -05:00
Slava Pestov
e11d1e37f5
math.vectors.simd: allow punning SIMD vectors between types
2009-09-04 02:35:58 -05:00
Slava Pestov
6494e7a53b
math.vectors.simd: slightly faster 'sum' on 256-bit vectors: add the two components then do horizontal add, instead of doing a horizontal add on each one and adding the results
2009-09-04 02:23:25 -05:00
Slava Pestov
1fc809b643
math.vectors.simd: docs
2009-09-04 01:22:18 -05:00
Slava Pestov
6b5e40b2fc
functors: support private words with DEFINES-PRIVATE; use this to make some words generated by math.vectors.simd.functor private
2009-09-04 01:21:59 -05:00
Slava Pestov
55c449c6e2
math.vectors.simd: define fallbacks for all vector constructors so that code can still work even if SIMD is not available
2009-09-03 21:37:55 -05:00
Slava Pestov
4d5a4222b6
More SIMD work
...
- Rename SIMD types and register representations: <type>-<count> rather than <count><type>-array
- Make a functor to define 256-bit vector types, use it to define float-8 type
- Make SIMD instructions pure-insns so that they participate in value numbering
2009-09-03 20:58:56 -05:00
Slava Pestov
bf81cb4259
math.vectors.simd: split off intrinsics into a sub-vocabulary, to avoid loading most of the SIMD code on bootstrap
2009-09-03 03:43:43 -05:00
Slava Pestov
906a0d212a
Detect SSE version and enable the correct set of SIMD intrinsics
2009-09-03 03:28:38 -05:00
Slava Pestov
ff8c70dbe0
Initial implementation of SSE vector intrinsics:
...
- cpu.architecture: add SSE vector representations
- compiler.cfg.intrinsics.alien: remove an attempt at optimization that value numbering handles now
- compiler.cfg.representations: support instructions where the representation is set in the 'rep' slot, and support conversions between single and double floats
- alien-float, set-alien-float now use the single float representation, and the conversion is implicit; this fixes a long-standing bug where a register could get clobbered because of how %set-alien-float was defined on x86
- math.vectors.specialization: add support for SIMD specialization (where the vector word's body is replaced by another quotation), also specialize the 'sum' word
- math.vectors.simd: 4float-array, 2double-array, 4double-array types, and specializers for the math.vectors words
2009-09-03 02:33:07 -05:00
Slava Pestov
e86a76a7d8
math.constants: add single float epsilon value
2009-09-03 02:23:22 -05:00
Samuel Tardieu
21a89bab0e
Make "divisors" work with 1 as well
2009-09-02 12:07:23 +02:00
Joe Groff
ccb27f81ea
update math.blas for <c-array> change
2009-08-30 22:37:58 -05:00
Slava Pestov
ec70e1d714
More minor documentation tweaks
2009-08-30 06:32:20 -05:00
Slava Pestov
7983b5515f
math.functions: some fixes
2009-08-30 06:19:14 -05:00
Slava Pestov
0db01f6d5f
compiler.cfg.linear-scan now supports partial sync-points where all registers are spilled; taking advantage of this, there are new trigonometric intrinsics which yield a 2x performance boost on benchmark.struct-arrays and a 25% boost on benchmark.partial-sums
2009-08-30 04:52:01 -05:00
Marc Fauconneau
2d4ba8de4d
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-30 17:31:30 +09:00
Marc Fauconneau
bf15648b4d
Merge branch 'master' of git@github.com:prunedtree/factor
...
Conflicts:
basis/math/matrices/matrices.factor
2009-08-30 17:24:25 +09:00
Samuel Tardieu
e5897d52b2
Ensure that random-prime result has the right size
...
As noted by Slava, choosing the next prime following a random number
with a specified number of bits may give a number one more bit long.
2009-08-29 21:42:15 +02:00
Slava Pestov
2bb6293217
compiler: add fixnum-min/max intrinsics; ~10% speedup on benchmark.yuv-to-rgb
2009-08-28 19:02:59 -05:00
Slava Pestov
d957ae4e44
Performance improvements to make struct-arrays benchmark faster
...
- improved optimization of ##unbox-any-c-ptr on ##box-displaced-alien; convert it to ##unbox-c-ptr where possible using class info stored in the ##bda instruction
- make fcos, fsin, etc inline again; everything in math.libm inline again, except for fsqrt which is an intrinsic
- convert min and max on floats to float-min and float-max
- make min and max not inline, so that the above can work
- struct-arrays: rice a bit so that more fixnums come up
2009-08-28 05:21:16 -05:00
Slava Pestov
0df8aadce2
cpu.x86: use SQRTSD instruction for math.libm:fsqrt word
2009-08-25 23:22:15 -05:00