Slava Pestov
1a0d9efa0f
Merge branch 'for-slava' of git://git.rfc1149.net/factor
2009-09-10 13:15:18 -05:00
Joe Groff
1a209d4ddb
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-09 23:38:01 -05:00
Joe Groff
4d5e547ba9
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
527db8995a
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
2a576f370b
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
3c9b2c327a
make math.floats.env backends unportable
2009-09-09 17:32:26 -05:00
Samuel Tardieu
5919ee8a79
Do not repeat sanity tests at each iteration
2009-09-09 21:35:24 +02:00
Joe Groff
8fff76fce2
add some tests to help track down leaks in FP state changes
2009-09-08 23:07:33 -05:00
Slava Pestov
3e90786bc1
Fix various test failures
2009-09-08 19:18:56 -05:00
Slava Pestov
3845472832
math.rectangles.positioning: don't position popups off-screen
2009-09-08 16:23:02 -05:00
Joe Groff
aaa394fedd
update math.floats.env.x86 for sse detection change
2009-09-08 15:47:03 -05:00
Joe Groff
e1841cc8d4
Merge branch 'master' of git://factorcode.org/git/factor
2009-09-08 15:37:32 -05:00
Joe Groff
4f43af5b7d
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
0d01371baf
math.vectors.simd: fix help rendering
2009-09-08 14:49:27 -05:00
Slava Pestov
c23e1dc1de
math.vectors.simd: remove useless dependency
2009-09-08 13:55:56 -05:00
Slava Pestov
ab64d187c9
Merge branch 'master' into simd
2009-09-08 13:38:14 -05:00
Slava Pestov
1e9f870e66
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
3ac777e237
Merge branch 'for-slava' of git://git.rfc1149.net/factor
2009-09-08 13:09:27 -05:00
Slava Pestov
853c94cbaa
Merge branch 'for-slava' of git://git.rfc1149.net/factor into simd
2009-09-08 13:02:00 -05:00
Slava Pestov
ef09991500
Fixes
2009-09-08 00:13:18 -05:00
Slava Pestov
17821626c3
Fix conflicts
2009-09-07 23:51:25 -05:00
Joe Groff
95e8b7bd19
tighten up math.floats.env docs
2009-09-07 10:50:40 -05:00
Joe Groff
11a8d2d71a
test fp traps
2009-09-06 09:04:46 -05:00
Joe Groff
fbd9e02917
make public words for querying current rounding mode, denormal mode, and trap set
2009-09-06 08:50:54 -05:00
Joe Groff
1d36bba11b
unit tests for math.floats.env
2009-09-06 07:50:56 -05:00
Joe Groff
327c9eb7b8
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
430f4a83f9
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
1c87486320
math.vectors.simd: allow punning SIMD vectors between types
2009-09-04 02:35:58 -05:00
Slava Pestov
136d6a42f3
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
af14fd78dd
math.vectors.simd: docs
2009-09-04 01:22:18 -05:00
Slava Pestov
fc195f33f1
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
698f32c4a1
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
20dfbf7ac8
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
9cc705f6ba
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
f811208271
Detect SSE version and enable the correct set of SIMD intrinsics
2009-09-03 03:28:38 -05:00
Slava Pestov
52b99c050e
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
9c3214ad98
math.constants: add single float epsilon value
2009-09-03 02:23:22 -05:00
Samuel Tardieu
0c76719312
Make "divisors" work with 1 as well
2009-09-02 12:07:23 +02:00
Joe Groff
d79cc05d6b
update math.blas for <c-array> change
2009-08-30 22:37:58 -05:00
Slava Pestov
24e2f087ea
More minor documentation tweaks
2009-08-30 06:32:20 -05:00
Slava Pestov
c19ec4b8ec
math.functions: some fixes
2009-08-30 06:19:14 -05:00
Slava Pestov
f6a836d1e9
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
a7a39d3766
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-30 17:31:30 +09:00
Marc Fauconneau
1f020f8bad
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
48ef66e45c
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
f30aa5d20e
compiler: add fixnum-min/max intrinsics; ~10% speedup on benchmark.yuv-to-rgb
2009-08-28 19:02:59 -05:00
Slava Pestov
99bf9fadfb
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
4fe0257169
cpu.x86: use SQRTSD instruction for math.libm:fsqrt word
2009-08-25 23:22:15 -05:00
Slava Pestov
2d5200ae84
math.intervals: comment out questionable unit tests
2009-08-22 19:39:32 -05:00
Slava Pestov
009d3a87f6
Add some unit tests
2009-08-22 17:15:10 -05:00