game-loop-benchmark-array - Factor Documentation

game-loop-benchmark-array


Vocabulary
specialized-arrays .instances .game .loop .benchmark .game-loop-benchmark

Definition
USING: alien sequences.private ;

IN:
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark

TUPLE: game-loop-benchmark-array
{ underlying c-ptr read-only initial: f }
{ length array-capacity read-only initial: 0 } ; final


Methods
USING: prettyprint.custom
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array >pprint-sequence ;


USING: accessors kernel
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array clone
[ underlying>> clone ] [ length>> ] bi
<direct-game-loop-benchmark-array> ; inline


USING: kernel
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
specialized-arrays.private ;

M: game-loop-benchmark-array direct-like
drop <direct-game-loop-benchmark-array> ; inline


USING: alien alien.c-types game.loop.benchmark kernel
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array element-size
drop \ game-loop-benchmark heap-size ; inline


USING: classes kernel sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array equal?
over game-loop-benchmark-array instance?
[ sequence= ] [ 2drop f ] if ;


USING: accessors sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array length length>> ; inline


USING: accessors alien alien.data classes game.loop.benchmark
kernel sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
specialized-vectors.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array like
drop dup game-loop-benchmark-array instance? [
dup game-loop-benchmark-vector instance? [
[ >c-ptr ] [ length>> ] bi
<direct-game-loop-benchmark-array>
] [ \ game-loop-benchmark >c-array ] if
] unless ; inline


USING: kernel sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
specialized-vectors.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array new-resizable
drop <game-loop-benchmark-vector> ; inline


USING: kernel sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array new-sequence
drop (game-loop-benchmark-array) ; inline


USING: accessors alien alien.c-types game.loop.benchmark kernel
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
specialized-arrays.private ;

M: game-loop-benchmark-array nth-c-ptr
underlying>> \ game-loop-benchmark array-accessor drop
swap <displaced-alien> ; inline


USING: accessors alien.c-types game.loop.benchmark kernel math
sequences.private
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array nth-unsafe
[ integer>fixnum ] dip
underlying>> \ game-loop-benchmark alien-element ; inline


USING: kernel prettyprint.custom
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array pprint-delims
drop \ game-loop-benchmark-array{ \ } ;


USING: accessors alien.c-types byte-arrays game.loop.benchmark
kernel math sequences.private
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array resize
[
[ \ game-loop-benchmark heap-size * ] [ underlying>> ]
bi* resize-byte-array
] keepd <direct-game-loop-benchmark-array> ; inline


USING: accessors alien.c-types game.loop.benchmark kernel math
sequences.private
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array set-nth-unsafe
[ integer>fixnum ] dip
underlying>> \ game-loop-benchmark set-alien-element ;
inline


USING: game.loop.benchmark kernel specialized-arrays
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array underlying-type
drop \ game-loop-benchmark ;


USING: alien.c-types game.loop.benchmark math math.vectors
sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array v*high
[ * \ game-loop-benchmark heap-size neg shift ] 2map ;
inline


USING: alien.c-types game.loop.benchmark math math.vectors
sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array vs*
[ * \ game-loop-benchmark c-type-clamp ] 2map ; inline


USING: alien.c-types game.loop.benchmark math math.vectors
sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array vs+
[ + \ game-loop-benchmark c-type-clamp ] 2map ; inline


USING: alien.c-types game.loop.benchmark math math.vectors
sequences
specialized-arrays.instances.game.loop.benchmark.game-loop-benchmark
;

M: game-loop-benchmark-array vs-
[ - \ game-loop-benchmark c-type-clamp ] 2map ; inline

AltStyle によって変換されたページ (->オリジナル) /