[gegl] operations: Remove unused variables
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations: Remove unused variables
- Date: Sat, 30 Nov 2013 12:27:07 +0000 (UTC)
commit d2fc883a4a6cbc253fb1730af94bc65d123f2714
Author: Daniel Sabo <DanielSabo gmail com>
Date: Fri Nov 29 15:08:35 2013 -0800
operations: Remove unused variables
operations/external/matting-levin-cblas.c | 25 +------------------------
operations/external/matting-levin.c | 11 ++---------
2 files changed, 3 insertions(+), 33 deletions(-)
---
diff --git a/operations/external/matting-levin-cblas.c b/operations/external/matting-levin-cblas.c
index f26f693..b417bd7 100644
--- a/operations/external/matting-levin-cblas.c
+++ b/operations/external/matting-levin-cblas.c
@@ -48,14 +48,11 @@ cblas_dgemm(enum CBLAS_ORDER order,
gdouble *restrict c,
gint ldc)
{
- /* System generated locals */
- gint i__1, i__2, i__3;
-
/* Local variables */
gint info;
gboolean nota, notb;
gdouble temp;
- gint i, j, l, ncola;
+ gint i, j, l;
gint nrowa, nrowb;
/* Rather than catering for arbitrary indexing, just force row-major */
@@ -74,12 +71,10 @@ cblas_dgemm(enum CBLAS_ORDER order,
if (nota)
{
nrowa = m;
- ncola = k;
}
else
{
nrowa = k;
- ncola = m;
}
if (notb)
{
@@ -121,31 +116,24 @@ cblas_dgemm(enum CBLAS_ORDER order,
if (nota)
{
/* Form C := alpha*A*B + beta*C. */
- i__1 = n;
for (j = 1; j <= n; ++j)
{
if (beta == 0.)
{
- i__2 = m;
-
for (i = 1; i <= m; ++i)
C(i,j) = 0.;
}
else if (beta != 1.)
{
- i__2 = m;
-
for (i = 1; i <= m; ++i)
C(i,j) = beta * C(i,j);
}
- i__2 = k;
for (l = 1; l <= k; ++l)
{
if (B(l,j) != 0.)
{
temp = alpha * B(l,j);
- i__3 = m;
for (i = 1; i <= m; ++i)
C(i,j) += temp * A(i,l);
@@ -155,14 +143,11 @@ cblas_dgemm(enum CBLAS_ORDER order,
}
else
{
- i__1 = n;
for (j = 1; j <= n; ++j)
{
- i__2 = m;
for (i = 1; i <= m; ++i)
{
temp = 0.;
- i__3 = k;
for (l = 1; l <= k; ++l)
temp += A(l,i) * B(l,j);
@@ -180,31 +165,26 @@ cblas_dgemm(enum CBLAS_ORDER order,
if (nota)
{
/* Form C := alpha*A*B' + beta*C */
- i__1 = n;
for (j = 1; j <= n; ++j)
{
if (beta == 0.)
{
- i__2 = m;
for (i = 1; i <= m; ++i)
C(i,j) = 0.;
}
else if (beta != 1.)
{
- i__2 = m;
for (i = 1; i <= m; ++i)
C(i,j) = beta * C(i,j);
}
- i__2 = k;
for (l = 1; l <= k; ++l)
{
if (B(j,l) != 0.)
{
temp = alpha * B(j,l);
- i__3 = m;
for (i = 1; i <= m; ++i)
C(i,j) += temp * A(i,l);
@@ -216,14 +196,11 @@ cblas_dgemm(enum CBLAS_ORDER order,
{
/* Form C := alpha*A'*B' + beta*C */
- i__1 = n;
for (j = 1; j <= n; ++j)
{
- i__2 = m;
for (i = 1; i <= m; ++i)
{
temp = 0.;
- i__3 = k;
for (l = 1; l <= k; ++l)
temp += A(l,i) * B(j,l);
diff --git a/operations/external/matting-levin.c b/operations/external/matting-levin.c
index 786eab0..1af27cd 100644
--- a/operations/external/matting-levin.c
+++ b/operations/external/matting-levin.c
@@ -762,8 +762,6 @@ matting_upsample (const gdouble *restrict pixels,
static const gdouble UPSAMPLE_KERNEL[] =
{ 0.125, 0.5, 0.75, 0.5, 0.125 };
- gint x_start, x_end,
- y_start, y_end;
gint x, y;
guint c;
gdouble *newpix = NULL;
@@ -776,16 +774,11 @@ matting_upsample (const gdouble *restrict pixels,
g_return_val_if_fail (abs (output->width - 2 * input->width ) <= 1, NULL);
g_return_val_if_fail (abs (output->height - 2 * input->height) <= 1, NULL);
- x_start = 1;
- y_start = 1;
- x_end = output->width - output->width % 2;
- y_end = output->height - output->height % 2;
-
newpix = g_new0 (gdouble, output->width * output->height * components);
- for (y = y_start; y < output->height; y += 2)
+ for (y = 1; y < output->height; y += 2)
{
- for (x = x_start; x < output->width; x += 2)
+ for (x = 1; x < output->width; x += 2)
{
guint newoff = (x + y * output->width) * components,
oldoff = (x / 2 + (y / 2) * input->width ) * components;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]