uniform.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* classes: h_files */
  2. #ifndef SCM_UNIFORM_H
  3. #define SCM_UNIFORM_H
  4. /* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006, 2008, 2009,
  5. * 2013, 2014 Free Software Foundation, Inc.
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public License
  9. * as published by the Free Software Foundation; either version 3 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. */
  22. #include "libguile/__scm.h"
  23. /*
  24. * Uniform vectors contain unboxed values. They are not necessarily contiguous.
  25. */
  26. SCM_INTERNAL const size_t scm_i_array_element_type_sizes[];
  27. #define SCM_ARRAY_ELEMENT_TYPE_IS_UNBOXED(t) \
  28. (scm_i_array_element_type_sizes[(t)] != 0)
  29. /* type size in bytes */
  30. SCM_API size_t scm_array_handle_uniform_element_size (scm_t_array_handle *h);
  31. /* type size in bits */
  32. SCM_API size_t scm_array_handle_uniform_element_bit_size (scm_t_array_handle *h);
  33. SCM_API const void *scm_array_handle_uniform_elements (scm_t_array_handle *h);
  34. SCM_API void *scm_array_handle_uniform_writable_elements (scm_t_array_handle *h);
  35. SCM_INTERNAL void scm_init_uniform (void);
  36. #endif /* SCM_UNIFORM_H */
  37. /*
  38. Local Variables:
  39. c-file-style: "gnu"
  40. End:
  41. */