diff options
author | Andy Wingo <wingo@pobox.com> | 2009-06-05 16:31:38 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-06-05 16:31:38 +0200 |
commit | 782a82eed13abb64393f7acad92758ae191ce509 (patch) | |
tree | 517a209c703d8810789dbdf3cfc23a835e21e5b1 /libguile/unif.h | |
parent | a9b0f876c12bbbca9bdf1890eb014a30f004d9f8 (diff) | |
download | guile-782a82eed13abb64393f7acad92758ae191ce509.tar.gz |
add ability to compile uniform arrays
* module/rnrs/bytevector.scm (rnrs):
* libguile/bytevectors.h:
* libguile/bytevectors.c (scm_uniform_array_to_bytevector): New function.
* libguile/unif.h:
* libguile/unif.c (scm_from_contiguous_typed_array): New function.
* libguile/vm-i-loader.c (load-array): New instruction, for loading byte
data into uniform vectors. Currently it copies out the data, though in
the future we could avoid that.
* module/language/assembly.scm (align-code): New exported function,
aligns code on some boundary.
(align-program): Use align-code.
* module/language/assembly/compile-bytecode.scm (write-bytecode): Support
the load-array instruction.
* module/language/glil/compile-assembly.scm (dump-object): Dump uniform
arrays. Neat :)
Diffstat (limited to 'libguile/unif.h')
-rw-r--r-- | libguile/unif.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/unif.h b/libguile/unif.h index a09bfc921..1d01f807d 100644 --- a/libguile/unif.h +++ b/libguile/unif.h @@ -45,6 +45,9 @@ SCM_API SCM scm_array_p (SCM v, SCM prot); SCM_API SCM scm_typed_array_p (SCM v, SCM type); SCM_API SCM scm_make_array (SCM fill, SCM bounds); SCM_API SCM scm_make_typed_array (SCM type, SCM fill, SCM bounds); +SCM_API SCM scm_from_contiguous_typed_array (SCM type, SCM bounds, + const void *bytes, + size_t byte_len); SCM_API SCM scm_array_rank (SCM ra); SCM_API size_t scm_c_array_rank (SCM ra); SCM_API SCM scm_array_dimensions (SCM ra); |