Displaying 20 results from an estimated 39 matches for "fabsf".
Did you mean:
fabs
2014 Apr 15
2
[PATCH 2/3] Use fabsf() instead of fabs() since we have floats, not double
...> #define IMAX(a,b) ((a) > (b) ? (a) : (b))
> @@ -273,12 +273,12 @@ static spx_word16_t sinc(float cutoff, float x, int
> N, struct FuncDef *window_fu
> {
> /*fprintf (stderr, "%f ", x);*/
> float xx = x * cutoff;
> - if (fabs(x)<1e-6f)
> + if (fabsf(x)<1e-6f)
> return WORD2INT(32768.*cutoff);
> - else if (fabs(x) > .5f*N)
> + else if (fabsf(x) > .5f*N)
> return 0;
> /*FIXME: Can it really be any slower than this? */
> - return WORD2INT(32768.*cutoff*sin(M_PI*xx)/(M_PI*xx) *
> compute_func(f...
2014 Apr 15
0
[PATCH 2/3] Use fabsf() instead of fabs() since we have floats, not double
...loorf(.5+(x))))
#endif
#define IMAX(a,b) ((a) > (b) ? (a) : (b))
@@ -273,12 +273,12 @@ static spx_word16_t sinc(float cutoff, float x, int N, struct FuncDef *window_fu
{
/*fprintf (stderr, "%f ", x);*/
float xx = x * cutoff;
- if (fabs(x)<1e-6f)
+ if (fabsf(x)<1e-6f)
return WORD2INT(32768.*cutoff);
- else if (fabs(x) > .5f*N)
+ else if (fabsf(x) > .5f*N)
return 0;
/*FIXME: Can it really be any slower than this? */
- return WORD2INT(32768.*cutoff*sin(M_PI*xx)/(M_PI*xx) * compute_func(fabs(2.*x/N), window_func));
+ ret...
2014 Apr 15
6
[PATCH 0/3] misc. cleanup
...I think the only way to find out how speexdsp has been compiled is
to resample some bytes and observe the output; which is awkard
I plan to post some patches in this direction shortly...
thanks, regards, p.
Peter Meerwald (3):
Resampler buffer_size is always 160, drop FIXED_POINT #ifdef
Use fabsf() instead of fabs() since we have floats, not double
Fix file permission of libspeexdsp/scal.c
libspeexdsp/resample.c | 18 +++++++-----------
libspeexdsp/scal.c | 0
2 files changed, 7 insertions(+), 11 deletions(-)
mode change 100755 => 100644 libspeexdsp/scal.c
--
1.9.1
2014 Jun 15
4
[PATCH v2 0/3] ARB_viewport_array for nvc0
This patch-series implements the ARB_viewport_array for nvc0 and does
a little house-cleanig afterwords.
V2:
Add Release-Notes, mark this in GL3 as done for nvc0
Don't mark the scissors dirty when we don't need to do that
Tobias Klausmann (3):
nvc0: implement multiple viewports/scissors, enable ARB_viewport_array
docs: update GL3.txt, relnotes: mark GL_ARB_viewport_array as done
2014 Jun 15
0
[PATCH v2 1/3] nvc0: implement multiple viewports/scissors, enable ARB_viewport_array
...VC0(push, NVC0_3D(VIEWPORT_SCALE_X(0)), 3);
- PUSH_DATAf(push, vp->scale[0]);
- PUSH_DATAf(push, vp->scale[1]);
- PUSH_DATAf(push, vp->scale[2]);
-
- /* now set the viewport rectangle to viewport dimensions for clipping */
-
- x = util_iround(MAX2(0.0f, vp->translate[0] - fabsf(vp->scale[0])));
- y = util_iround(MAX2(0.0f, vp->translate[1] - fabsf(vp->scale[1])));
- w = util_iround(vp->translate[0] + fabsf(vp->scale[0])) - x;
- h = util_iround(vp->translate[1] + fabsf(vp->scale[1])) - y;
-
- zmin = vp->translate[2] - fabsf(vp->scale[...
2014 Jun 14
0
[PATCH 1/3] nvc0: implement multiple viewports/scissors, enable ARB_viewport_array
...VC0(push, NVC0_3D(VIEWPORT_SCALE_X(0)), 3);
- PUSH_DATAf(push, vp->scale[0]);
- PUSH_DATAf(push, vp->scale[1]);
- PUSH_DATAf(push, vp->scale[2]);
-
- /* now set the viewport rectangle to viewport dimensions for clipping */
-
- x = util_iround(MAX2(0.0f, vp->translate[0] - fabsf(vp->scale[0])));
- y = util_iround(MAX2(0.0f, vp->translate[1] - fabsf(vp->scale[1])));
- w = util_iround(vp->translate[0] + fabsf(vp->scale[0])) - x;
- h = util_iround(vp->translate[1] + fabsf(vp->scale[1])) - y;
-
- zmin = vp->translate[2] - fabsf(vp->scale[...
2014 Jun 14
7
[PATCH 0/3] ARB_viewport_array for nvc0
This patch-series implements the ARB_viewport_array for nvc0 and does
a little house-cleanig afterwords.
Tobias Klausmann (3):
nvc0: implement multiple viewports/scissors, enable ARB_viewport_array
nvc0: mark scissor in nvc0_clear_{}
nv50/ir: Remove NV50_SEMANTIC_VIEWPORTINDEX and its last consumer
.../drivers/nouveau/codegen/nv50_ir_driver.h | 1 -
2016 Oct 27
2
Bug with auto-vectorization of logf
Hi,
I intended to file this bug on Bugzilla, but I've received no response from
llvm-admin in the 10 days since asking for a Bugzilla account.
I've written 2 test functions in C that take in a float array x of size n
and output float array f(x), where f is either fabsf or logf. The LLVM 3.9
auto-vectorization docs claim that both functions will be vectorized:
http://llvm.org/releases/3.9.0/docs/Vectorizers.html#vectorization-of-function-calls
When running with "clang -O3 -march=x86-64 -mavx2 -ffast-math test.c -S
-emit-llvm", the function calling fabsf...
2016 Oct 27
0
Bug with auto-vectorization of logf
...>
> Hi,
> I intended to file this bug on Bugzilla, but I've received no response from llvm-admin in the 10 days since asking for a Bugzilla account.
>
> I've written 2 test functions in C that take in a float array x of size n and output float array f(x), where f is either fabsf or logf. The LLVM 3.9 auto-vectorization docs claim that both functions will be vectorized: http://llvm.org/releases/3.9.0/docs/Vectorizers.html#vectorization-of-function-calls <http://llvm.org/releases/3.9.0/docs/Vectorizers.html#vectorization-of-function-calls>
>
> When running with...
2016 Oct 28
1
Bug with auto-vectorization of logf
...Hi,
>> I intended to file this bug on Bugzilla, but I've received no response from llvm-admin in the 10 days since asking for a Bugzilla account.
>>
>> I've written 2 test functions in C that take in a float array x of size n and output float array f(x), where f is either fabsf or logf. The LLVM 3.9 auto-vectorization docs claim that both functions will be vectorized: http://llvm.org/releases/3.9.0/docs/Vectorizers.html#vectorization-of-function-calls <http://llvm.org/releases/3.9.0/docs/Vectorizers.html#vectorization-of-function-calls>
>>
>> When runni...
2014 Feb 04
2
[PATCH 1/3] nv50: rework primid logic
Functionally identical but much simpler. Should also better integrate
with future layer/viewport changes/fixes.
Cc: 10.1 <mesa-stable at lists.freedesktop.org>
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
Not *strictly* necessary in stable, but it will make backporting later fixes
easier. No regressions in piglit.
src/gallium/drivers/nouveau/nv50/nv50_program.c | 5
2004 Mar 22
1
apsort
you probably don't want the ~2% perf improvement below... but i figured
i'd post it anyhow :)
well... i do suggest the use of fabsf() rather than fabs() -- gcc doesn't
seem smart enough to figure out fabs() when you ask it to compile
"-mfpmath=sse".
but the #else part uses properties of ieee-754 float layout which you may
or may not be interested in (ab)using. basically the left shift lops off
the sign bit, then...
2016 Mar 21
2
PATCH: clang/LLVM - Sparc - inline ASM with floating pointer registers
Hi lists,
Sorry for cross-posting, but these two patches are of concern to clang
and llvm.
I'm compiling C-code which includes inline assembler which looks like
the following using the sparc-target:
static inline float fabsf(float a)
{
float res;
__asm __volatile__("fabss %1, %0;"
: "=f"(res)
: "f"(a));
return res;
}
This fails with llvm/clang - trunk/master.
I patched clang and llvm and, as I'm new to both project, I'm having
doub...
2017 Feb 08
3
Stripping Debug Locations on cross BB moves, part 2 (PR31891)
So Reid came across a case where the current strategy (dropping locations
when they move across basic blocks) proves to be at odds with another
precept we have: inlinable calls must have locations, so that if/when they
are inlined the location can be accurately described (due to the nature of
our IR representation of inlining, a location must be given for the call
site so that the DIEs for the
2002 Jul 26
1
libvorbis-1.0 patch for Solaris 5.8 buggy libc qsort.
...t part --------------
--- lib/psy.c Sat Jul 13 05:18:33 2002
+++ lib/psy_new.c Fri Jul 26 14:50:10 2002
@@ -950,7 +950,10 @@
/* this is for per-channel noise normalization */
static int apsort(const void *a, const void *b){
- if(fabs(**(float **)a)>fabs(**(float **)b))return -1;
+ float f1=fabsf(**(float**)a);
+ float f2=fabsf(**(float**)b);
+ if(f1>f2)return -1;
+ if(f1==f2)return 0;
return 1;
}
2016 Mar 21
0
[cfe-dev] PATCH: clang/LLVM - Sparc - inline ASM with floating pointer registers
...v at lists.llvm.org> wrote:
> Hi lists,
>
> Sorry for cross-posting, but these two patches are of concern to clang
> and llvm.
>
> I'm compiling C-code which includes inline assembler which looks like
> the following using the sparc-target:
>
> static inline float fabsf(float a)
> {
> float res;
> __asm __volatile__("fabss %1, %0;"
> : "=f"(res)
> : "f"(a));
> return res;
> }
>
> This fails with llvm/clang - trunk/master.
>
> I patched clang and llvm and...
2005 Jan 06
1
[LLVMdev] Math instructions
Chris Lattner wrote:
> The way to deal with this is to add LLVM intrinsics, but only for
> functions that set errno. For example, you could add llvm.sqrt, which
> is just undefined on a negative value other than -0.0. For your uses,
> you just emit llvm.sqrt, the C frontend will make use of it and wrap
> errno handling around it as required.
>
> For functions like
2005 Apr 28
0
[LLVMdev] Floating point instructions patch
...l pieces of it here:
Add and legalize new nodes:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050425/025890.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050425/025891.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050425/025892.html
Add fabs/fabsf support to x86 isel simple:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050425/025893.html
Add fsqrt support to x86 pattern isel:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050425/025896.html
New X86 instrs:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of...
2005 Apr 28
3
[LLVMdev] Floating point instructions patch
Hello,
I have been gone for a while, finishing work on my Master's thesis... Now that I'm back I updated LLVM to the most
recent version and found that my FP_ABS SelectionDAGNode type and code generation was now conflicting with the new FABS
node type. I brought the rest of my local modifications in line with the FABS implementation, so here is my patch that
includes sqrt, sin and cos
2014 Jun 17
2
[PATCH 1/3] nvc0: remove vport_int hack and instead use the usual state validation
...(struct nvc0_context *nvc0)
PUSH_DATA (push, (w << 16) | x);
PUSH_DATA (push, (h << 16) | y);
- if (i == 0) {
- nvc0->vport_int[0] = (w << 16) | x;
- nvc0->vport_int[1] = (h << 16) | y;
- }
-
zmin = vp->translate[2] - fabsf(vp->scale[2]);
zmax = vp->translate[2] + fabsf(vp->scale[2]);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index f782eec..a29f0cc 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/driver...