fix more ambiguities
parent
fa60d96ae4
commit
1f04ed01fe
|
@ -9,14 +9,16 @@ ERROR: bad-length got expected ;
|
|||
|
||||
FUNCTOR: define-simd-128 ( T -- )
|
||||
|
||||
N [ 16 T heap-size /i ]
|
||||
T-TYPE IS ${T}
|
||||
|
||||
N [ 16 T-TYPE heap-size /i ]
|
||||
|
||||
A DEFINES-CLASS ${T}-${N}
|
||||
>A DEFINES >${A}
|
||||
A{ DEFINES ${A}{
|
||||
|
||||
NTH [ T dup c-type-getter-boxer array-accessor ]
|
||||
SET-NTH [ T dup c-setter array-accessor ]
|
||||
NTH [ T-TYPE dup c-type-getter-boxer array-accessor ]
|
||||
SET-NTH [ T-TYPE dup c-setter array-accessor ]
|
||||
|
||||
A-rep IS ${A}-rep
|
||||
A-vv->v-op DEFINES-PRIVATE ${A}-vv->v-op
|
||||
|
@ -74,7 +76,9 @@ PRIVATE>
|
|||
! Synthesize 256-bit vectors from a pair of 128-bit vectors
|
||||
FUNCTOR: define-simd-256 ( T -- )
|
||||
|
||||
N [ 32 T heap-size /i ]
|
||||
T-TYPE IS ${T}
|
||||
|
||||
N [ 32 T-TYPE heap-size /i ]
|
||||
|
||||
N/2 [ N 2 / ]
|
||||
A/2 IS ${T}-${N/2}
|
||||
|
|
|
@ -5,6 +5,8 @@ kernel math math.functions math.vectors
|
|||
math.vectors.simd.functor math.vectors.simd.intrinsics
|
||||
math.vectors.specialization parser prettyprint.custom sequences
|
||||
sequences.private locals assocs words fry ;
|
||||
FROM: alien.c-types => float ;
|
||||
QUALIFIED-WITH: math m
|
||||
IN: math.vectors.simd
|
||||
|
||||
<<
|
||||
|
@ -15,9 +17,9 @@ DEFER: float-8
|
|||
DEFER: double-4
|
||||
|
||||
"double" define-simd-128
|
||||
"float" define-simd-128
|
||||
"float" define-simd-128
|
||||
"double" define-simd-256
|
||||
"float" define-simd-256
|
||||
"float" define-simd-256
|
||||
|
||||
>>
|
||||
|
||||
|
@ -136,7 +138,7 @@ DEFER: double-4
|
|||
|
||||
PRIVATE>
|
||||
|
||||
\ float-4 \ float-4-with float H{
|
||||
\ float-4 \ float-4-with m:float H{
|
||||
{ v+ [ [ (simd-v+) ] float-4-vv->v-op ] }
|
||||
{ v- [ [ (simd-v-) ] float-4-vv->v-op ] }
|
||||
{ v* [ [ (simd-v*) ] float-4-vv->v-op ] }
|
||||
|
@ -146,7 +148,7 @@ PRIVATE>
|
|||
{ sum [ [ (simd-sum) ] float-4-v->n-op ] }
|
||||
} simd-vector-words
|
||||
|
||||
\ double-2 \ double-2-with float H{
|
||||
\ double-2 \ double-2-with m:float H{
|
||||
{ v+ [ [ (simd-v+) ] double-2-vv->v-op ] }
|
||||
{ v- [ [ (simd-v-) ] double-2-vv->v-op ] }
|
||||
{ v* [ [ (simd-v*) ] double-2-vv->v-op ] }
|
||||
|
@ -156,7 +158,7 @@ PRIVATE>
|
|||
{ sum [ [ (simd-sum) ] double-2-v->n-op ] }
|
||||
} simd-vector-words
|
||||
|
||||
\ float-8 \ float-8-with float H{
|
||||
\ float-8 \ float-8-with m:float H{
|
||||
{ v+ [ [ (simd-v+) ] float-8-vv->v-op ] }
|
||||
{ v- [ [ (simd-v-) ] float-8-vv->v-op ] }
|
||||
{ v* [ [ (simd-v*) ] float-8-vv->v-op ] }
|
||||
|
@ -166,7 +168,7 @@ PRIVATE>
|
|||
{ sum [ [ (simd-sum) ] [ + ] float-8-v->n-op ] }
|
||||
} simd-vector-words
|
||||
|
||||
\ double-4 \ double-4-with float H{
|
||||
\ double-4 \ double-4-with m:float H{
|
||||
{ v+ [ [ (simd-v+) ] double-4-vv->v-op ] }
|
||||
{ v- [ [ (simd-v-) ] double-4-vv->v-op ] }
|
||||
{ v* [ [ (simd-v*) ] double-4-vv->v-op ] }
|
||||
|
|
|
@ -5,6 +5,7 @@ kernel arrays combinators compiler compiler.units classes.struct
|
|||
combinators.smart compiler.tree.debugger math libc destructors
|
||||
sequences.private multiline eval words vocabs namespaces
|
||||
assocs prettyprint ;
|
||||
FROM: alien.c-types => float ;
|
||||
|
||||
SPECIALIZED-ARRAY: int
|
||||
SPECIALIZED-ARRAY: bool
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
USING: accessors kernel arrays alien alien.c-types alien.strings
|
||||
alien.syntax classes.struct math math.bitwise words sequences
|
||||
namespaces continuations io io.encodings.ascii x11.syntax ;
|
||||
FROM: alien.c-types => short ;
|
||||
IN: x11.xlib
|
||||
|
||||
LIBRARY: xlib
|
||||
|
|
|
@ -6,6 +6,7 @@ combinators combinators.short-circuit destructors fry
|
|||
io.encodings.utf8 kernel libc sequences
|
||||
specialized-arrays strings unix.utilities vocabs.parser
|
||||
words libc.private locals generalizations math ;
|
||||
FROM: alien.c-types => float short ;
|
||||
SPECIALIZED-ARRAY: bool
|
||||
SPECIALIZED-ARRAY: char
|
||||
SPECIALIZED-ARRAY: double
|
||||
|
|
|
@ -3,8 +3,9 @@ http.client io io.encodings.ascii io.files io.files.temp kernel
|
|||
math math.matrices math.parser math.vectors opengl
|
||||
opengl.capabilities opengl.gl opengl.demo-support sequences
|
||||
splitting vectors words specialized-arrays ;
|
||||
SPECIALIZED-ARRAY: float
|
||||
SPECIALIZED-ARRAY: uint
|
||||
QUALIFIED-WITH: alien.c-types c
|
||||
SPECIALIZED-ARRAY: c:float
|
||||
SPECIALIZED-ARRAY: c:uint
|
||||
IN: bunny.model
|
||||
|
||||
: numbers ( str -- seq )
|
||||
|
|
|
@ -3,6 +3,7 @@ USING: accessors alien.c-types arrays byte-arrays combinators
|
|||
destructors fry gpu gpu.buffers images kernel locals math
|
||||
opengl opengl.gl opengl.textures sequences
|
||||
specialized-arrays ui.gadgets.worlds variants ;
|
||||
FROM: alien.c-types => float ;
|
||||
SPECIALIZED-ARRAY: float
|
||||
IN: gpu.textures
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ USING: kernel accessors arrays alien system combinators
|
|||
alien.syntax namespaces alien.c-types sequences vocabs.loader
|
||||
shuffle openal.backend alien.libraries generalizations
|
||||
specialized-arrays ;
|
||||
FROM: alien.c-types => float short ;
|
||||
SPECIALIZED-ARRAY: uint
|
||||
IN: openal
|
||||
|
||||
|
|
Loading…
Reference in New Issue