Previous: , Up: SRFI-4   [Contents][Index]


7.5.5.4 SRFI-4 - Guile extensions

Guile defines some useful extensions to SRFI-4, which are not available in the default Guile environment. They may be imported by loading the extensions module:

(use-modules (srfi srfi-4 gnu))
Scheme Procedure: srfi-4-vector-type-size obj

Return the size, in bytes, of each element of SRFI-4 vector obj. For example, (srfi-4-vector-type-size #u32()) returns 4.

Scheme Procedure: any->u8vector obj
Scheme Procedure: any->s8vector obj
Scheme Procedure: any->u16vector obj
Scheme Procedure: any->s16vector obj
Scheme Procedure: any->u32vector obj
Scheme Procedure: any->s32vector obj
Scheme Procedure: any->u64vector obj
Scheme Procedure: any->s64vector obj
Scheme Procedure: any->f32vector obj
Scheme Procedure: any->f64vector obj
Scheme Procedure: any->c32vector obj
Scheme Procedure: any->c64vector obj
C Function: scm_any_to_u8vector (obj)
C Function: scm_any_to_s8vector (obj)
C Function: scm_any_to_u16vector (obj)
C Function: scm_any_to_s16vector (obj)
C Function: scm_any_to_u32vector (obj)
C Function: scm_any_to_s32vector (obj)
C Function: scm_any_to_u64vector (obj)
C Function: scm_any_to_s64vector (obj)
C Function: scm_any_to_f32vector (obj)
C Function: scm_any_to_f64vector (obj)
C Function: scm_any_to_c32vector (obj)
C Function: scm_any_to_c64vector (obj)

Return a (maybe newly allocated) uniform numeric vector of the indicated type, initialized with the elements of obj, which must be a list, a vector, or a uniform vector. When obj is already a suitable uniform numeric vector, it is returned unchanged.

Scheme Procedure: u8vector-copy! dst at src [start [end]]
Scheme Procedure: s8vector-copy! dst at src [start [end]]
Scheme Procedure: u16vector-copy! dst at src [start [end]]
Scheme Procedure: s16vector-copy! dst at src [start [end]]
Scheme Procedure: u32vector-copy! dst at src [start [end]]
Scheme Procedure: s32vector-copy! dst at src [start [end]]
Scheme Procedure: u64vector-copy! dst at src [start [end]]
Scheme Procedure: s64vector-copy! dst at src [start [end]]
Scheme Procedure: f32vector-copy! dst at src [start [end]]
Scheme Procedure: f64vector-copy! dst at src [start [end]]
Scheme Procedure: c32vector-copy! dst at src [start [end]]
Scheme Procedure: c64vector-copy! dst at src [start [end]]

Copy a block of elements from src to dst, both of which must be vectors of the indicated type, starting in dst at at and starting in src at start and ending at end. It is an error for dst to have a length less than at + (end - start). at and start default to 0 and end defaults to the length of src.

If source and destination overlap, copying takes place as if the source is first copied into a temporary vector and then into the destination.

See also vector-copy!.

Scheme Procedure: u8vector-copy src [start [end]]
Scheme Procedure: s8vector-copy src [start [end]]
Scheme Procedure: u16vector-copy src [start [end]]
Scheme Procedure: s16vector-copy src [start [end]]
Scheme Procedure: u32vector-copy src [start [end]]
Scheme Procedure: s32vector-copy src [start [end]]
Scheme Procedure: u64vector-copy src [start [end]]
Scheme Procedure: s64vector-copy src [start [end]]
Scheme Procedure: f32vector-copy src [start [end]]
Scheme Procedure: f64vector-copy src [start [end]]
Scheme Procedure: c32vector-copy src [start [end]]
Scheme Procedure: c64vector-copy src [start [end]]

Returns a freshly allocated vector of the indicated type, which must be the same as that of src, containing the elements of src between start and end. start defaults to 0 and end defaults to the length of src.

See also vector-copy.


Previous: , Up: SRFI-4   [Contents][Index]