[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-278-g72e2b
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-278-g72e2b59 |
Date: |
Wed, 03 Apr 2013 12:50:44 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=72e2b5923a15f49fd7f7706fe35dfc1157a41bb5
The branch, stable-2.0 has been updated
via 72e2b5923a15f49fd7f7706fe35dfc1157a41bb5 (commit)
from 9a31a54561b859dfbaca4f4523252a76adb56386 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 72e2b5923a15f49fd7f7706fe35dfc1157a41bb5
Author: Daniel Llorens <address@hidden>
Date: Mon Apr 1 18:43:58 2013 +0200
Remove double indirection in element access in array-copy!
* libguile/array-map.c: (racp): factor scm_generalized_vector_ref,
scm_generalized_vector_set_x out of the rank-1 loop.
Signed-off-by: Ludovic Courtès <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
libguile/array-map.c | 31 ++++++++++++++++++++-----------
1 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/libguile/array-map.c b/libguile/array-map.c
index d4da152..00a24f1 100644
--- a/libguile/array-map.c
+++ b/libguile/array-map.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 1996,1998,2000,2001,2004,2005, 2006, 2008, 2009, 2010, 2012
Free Software Foundation, Inc.
- *
+/* Copyright (C) 1996, 1998, 2000, 2001, 2004, 2005, 2006, 2008, 2009,
+ * 2010, 2012, 2013 Free Software Foundation, Inc.
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3 of
@@ -350,21 +351,29 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore
SCM_UNUSED)
#undef FUNC_NAME
-
-static int
+static int
racp (SCM src, SCM dst)
{
long n = (SCM_I_ARRAY_DIMS (src)->ubnd - SCM_I_ARRAY_DIMS (src)->lbnd + 1);
- long inc_d, inc_s = SCM_I_ARRAY_DIMS (src)->inc;
- unsigned long i_d, i_s = SCM_I_ARRAY_BASE (src);
+ scm_t_array_handle h_s, h_d;
+ size_t i_s, i_d;
+ ssize_t inc_s, inc_d;
+
dst = SCM_CAR (dst);
- inc_d = SCM_I_ARRAY_DIMS (dst)->inc;
- i_d = SCM_I_ARRAY_BASE (dst);
- src = SCM_I_ARRAY_V (src);
- dst = SCM_I_ARRAY_V (dst);
+ scm_generalized_vector_get_handle (SCM_I_ARRAY_V (src), &h_s);
+ scm_generalized_vector_get_handle (SCM_I_ARRAY_V (dst), &h_d);
+
+ i_s = h_s.base + h_s.dims[0].lbnd + SCM_I_ARRAY_BASE (src) * h_s.dims[0].inc;
+ i_d = h_d.base + h_d.dims[0].lbnd + SCM_I_ARRAY_BASE (dst) * h_d.dims[0].inc;
+ inc_s = SCM_I_ARRAY_DIMS (src)->inc * h_s.dims[0].inc;
+ inc_d = SCM_I_ARRAY_DIMS (dst)->inc * h_d.dims[0].inc;
for (; n-- > 0; i_s += inc_s, i_d += inc_d)
- GVSET (dst, i_d, GVREF (src, i_s));
+ h_d.impl->vset (&h_d, i_d, h_s.impl->vref (&h_s, i_s));
+
+ scm_array_handle_release (&h_d);
+ scm_array_handle_release (&h_s);
+
return 1;
}
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-278-g72e2b59,
Ludovic Courtès <=