From cc945de5ffb92d1efc372c79c6f9c6f400b3563d Mon Sep 17 00:00:00 2001 From: Martin Uecker Date: Tue, 25 Jun 2024 13:49:16 +0200 Subject: [PATCH] remove useless casts --- src/linops/grad.c | 2 +- src/nn/rbf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linops/grad.c b/src/linops/grad.c index a7a24e0e7..e6c9cecda 100644 --- a/src/linops/grad.c +++ b/src/linops/grad.c @@ -55,7 +55,7 @@ static void grad_op(int D, const long dims[D], int d, unsigned long flags, compl for (int i = 0; i < N; i++) { - int lsb = (int)ffsl((long)flags2) - 1; + int lsb = ffsl((long)flags2) - 1; flags2 = MD_CLEAR(flags2, lsb); md_zfdiff2(D, dims1, lsb, strs, (void*)out + i * strs[d], strs1, in); diff --git a/src/nn/rbf.c b/src/nn/rbf.c index f1ebe5a64..b0398934e 100644 --- a/src/nn/rbf.c +++ b/src/nn/rbf.c @@ -384,7 +384,7 @@ const struct nlop_s* nlop_activation_rbf_create(const long dims[3], float Imax, //The paper states \sigma = (Imax - Imin) / (Nw - 1) //However sigma is implemented differently, i.e. \sigma = (Imax - Imin) / (Nw) //C.f. https://github.com/VLOGroup/tensorflow-icg/blob/a11ad61d93d57c83f1af312b84a922e7612ec398/tensorflow/contrib/icg/kernels/activations.cu.cc#L123 - data->sigma = (float)(Imax - Imin) / (float)(dims[2]); + data->sigma = (Imax - Imin) / (float)(dims[2]); long zdims[2] = {dims[0], dims[1]}; long wdims[2] = {dims[0], dims[2]};