vbitxor ( u v -- w ) (original) (raw)

vbitxor ( u v -- w )
Factor handbook » The language » Numbers » Vector operations » Vector component- and bit-wise logic

Prev: vbitor ( u v -- w )
Next: vbitnot ( v -- w )

Vocabulary
math.vectors

Inputs

u a sequence of reals
v a sequence of reals

Outputs

w a sequence of reals

Word description
Takes the bitwise exclusive or of u and v component-wise.

Notes
Unlike bitxor, this word may be used on a specialized array of floats or doubles, in which case the bitwise representation of the floating point numbers is operated upon.

See also
vbitand, vbitandn, vbitor, vbitnot

Definition

IN: math.vectors

GENERIC: vbitxor ( u v -- w )

Methods

USING: generic math.vectors sequences.cords ;

M: cord vbitxor
[ vbitxor ] [ M\ cord vbitxor (call-next-method) ] cord-2map
; inline

USING: kernel math math.vectors sequences ;

M: object vbitxor [ bitxor ] 2map ; inline

USING: generic kernel math.vectors math.vectors.simd
math.vectors.simd.intrinsics math.vectors.simd.private ;

M: simd-128 vbitxor
dup simd-rep
[ (simd-vbitxor) ]
[ M\ simd-128 vbitxor (call-next-method) ] vv->v-op ; inline