srfi-4.scm 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ;;; srfi-4.scm --- Homogeneous Numeric Vector Datatypes
  2. ;; Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
  3. ;;
  4. ;; This library is free software; you can redistribute it and/or
  5. ;; modify it under the terms of the GNU Lesser General Public
  6. ;; License as published by the Free Software Foundation; either
  7. ;; version 2.1 of the License, or (at your option) any later version.
  8. ;;
  9. ;; This library is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. ;; Lesser General Public License for more details.
  13. ;;
  14. ;; You should have received a copy of the GNU Lesser General Public
  15. ;; License along with this library; if not, write to the Free Software
  16. ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. ;;; Author: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
  18. ;;; Commentary:
  19. ;; This module exports the homogeneous numeric vector procedures as
  20. ;; defined in SRFI-4. They are fully documented in the Guile
  21. ;; Reference Manual.
  22. ;;; Code:
  23. (define-module (srfi srfi-4))
  24. (re-export
  25. ;;; Unsigned 8-bit vectors.
  26. u8vector? make-u8vector u8vector u8vector-length u8vector-ref
  27. u8vector-set! u8vector->list list->u8vector
  28. ;;; Signed 8-bit vectors.
  29. s8vector? make-s8vector s8vector s8vector-length s8vector-ref
  30. s8vector-set! s8vector->list list->s8vector
  31. ;;; Unsigned 16-bit vectors.
  32. u16vector? make-u16vector u16vector u16vector-length u16vector-ref
  33. u16vector-set! u16vector->list list->u16vector
  34. ;;; Signed 16-bit vectors.
  35. s16vector? make-s16vector s16vector s16vector-length s16vector-ref
  36. s16vector-set! s16vector->list list->s16vector
  37. ;;; Unsigned 32-bit vectors.
  38. u32vector? make-u32vector u32vector u32vector-length u32vector-ref
  39. u32vector-set! u32vector->list list->u32vector
  40. ;;; Signed 32-bit vectors.
  41. s32vector? make-s32vector s32vector s32vector-length s32vector-ref
  42. s32vector-set! s32vector->list list->s32vector
  43. ;;; Unsigned 64-bit vectors.
  44. u64vector? make-u64vector u64vector u64vector-length u64vector-ref
  45. u64vector-set! u64vector->list list->u64vector
  46. ;;; Signed 64-bit vectors.
  47. s64vector? make-s64vector s64vector s64vector-length s64vector-ref
  48. s64vector-set! s64vector->list list->s64vector
  49. ;;; 32-bit floating point vectors.
  50. f32vector? make-f32vector f32vector f32vector-length f32vector-ref
  51. f32vector-set! f32vector->list list->f32vector
  52. ;;; 64-bit floating point vectors.
  53. f64vector? make-f64vector f64vector f64vector-length f64vector-ref
  54. f64vector-set! f64vector->list list->f64vector
  55. )