search for: iszero

Displaying 20 results from an estimated 71 matches for "iszero".

2013 Mar 19
0
[LLVMdev] setCC and brcond
...ase:%retval] CGP: Found local addrmode: [Base:%retval] Computing probabilities for return Computing probabilities for if.then Computing probabilities for if.else Computing probabilities for entry set edge entry -> 1 successor weight to 20 set edge entry -> 0 successor weight to 12 === isZero Initial selection DAG: BB#0 'isZero:entry' SelectionDAG has 16 nodes: 0x17d0fb0: ch = EntryToken [ORD=1] 0x17f6880: i32 = FrameIndex<1> [ORD=1] 0x17f6a80: i32 = undef [ORD=1] 0x17d0fb0: <multiple use> 0x17d0fb0: <multiple use> 0x17f6680: i32 = Regi...
2023 Mar 01
6
[libnbd PATCH 0/6] common: catch up with nbdkit
...mmon baseline for porting my recent patches from libnbd to nbdkit. The larger LISTEN_FDNAMES series will be resumed even later. Laszlo Eric Blake (1): tests: Avoid odd test behavior under NDEBUG [partial port] Richard W.M. Jones (5): common/include: Add unit tests [byte-swapping, isaligned, iszero] common/include: Add further unit tests [minmax] common: include: Define bswap_16, bswap_32 and bswap_64 [finish port] vector: Add vector_duplicate function common/include: Fix MIN and MAX macros so they can be nested [finish port] .gitignore | 4 + common/i...
2020 Jan 30
2
[PATCH libnbd] python: Add AIO buffer is_zero method.
Fast testing whether the AIO buffer (or regions within it) contain all zeroes, which allows Python code to quickly do sparsification when copying. This includes the iszero.h header from nbdkit which is distributed under a compatible license. --- common/include/Makefile.am | 5 +-- common/include/iszero.h | 63 +++++++++++++++++++++++++++++++++++++ generator/generator | 17 ++++++++-- python/Makefile.am | 3 +- python/handle.c | 47...
2020 Jul 07
2
[nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
.... common/include/test-ascii-ctype.c | 1 + common/include/test-ascii-string.c | 1 + common/include/test-byte-swapping.c | 1 + common/include/test-current-dir-name.c | 1 + common/include/test-isaligned.c | 1 + common/include/test-ispowerof2.c | 1 + common/include/test-iszero.c | 1 + common/include/test-minmax.c | 1 + common/include/test-nextnonzero.c | 1 + common/bitmap/test-bitmap.c | 1 + common/utils/test-quotes.c | 1 + common/utils/test-vector.c | 1 + tests/test-layers-filter.c | 1 + test...
2018 Aug 01
2
Re: [PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
...header files containing functions which > will be consumed by filters in later commits. > --- > Makefile.am | 5 +++- > common/include/Makefile.am | 39 ++++++++++++++++++++++++ > common/include/ispowerof2.h | 50 +++++++++++++++++++++++++++++++ > common/include/iszero.h | 60 +++++++++++++++++++++++++++++++++++++ > configure.ac | 1 + > 5 files changed, 154 insertions(+), 1 deletion(-) > > diff --git a/Makefile.am b/Makefile.am > index 6a3a377..09dbdb9 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -53,7 +53,10 @@...
2012 Apr 05
3
[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
...source and destination, so I can keep track of which is which. It didn't matter so much when you were simply proving or disproving dependence, but when you compute direction, it's suddenly crucial. The problem is the computation of direction from distance. The code says: if (distance->isZero()) S->Direction = Subscript::EQ; else if (isGT) S->Direction = Subscript::GT; else S->Direction = Subscript::LT; While it looks sensible, it's incorrect. Correct is if (distance->isZero()) S->Direction = Subscript::EQ; else if (isGT) S->Direction = Subscript::LT;...
2020 Jul 07
0
Re: [nbdkit PATCH] RFC tests: Avoid odd test behavior under NDEBUG
...ctype.c | 1 + > common/include/test-ascii-string.c | 1 + > common/include/test-byte-swapping.c | 1 + > common/include/test-current-dir-name.c | 1 + > common/include/test-isaligned.c | 1 + > common/include/test-ispowerof2.c | 1 + > common/include/test-iszero.c | 1 + > common/include/test-minmax.c | 1 + > common/include/test-nextnonzero.c | 1 + > common/bitmap/test-bitmap.c | 1 + > common/utils/test-quotes.c | 1 + > common/utils/test-vector.c | 1 + > tests/test-layers-fi...
2018 Aug 01
0
[PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
...urrently this adds two useful header files containing functions which will be consumed by filters in later commits. --- Makefile.am | 5 +++- common/include/Makefile.am | 39 ++++++++++++++++++++++++ common/include/ispowerof2.h | 50 +++++++++++++++++++++++++++++++ common/include/iszero.h | 60 +++++++++++++++++++++++++++++++++++++ configure.ac | 1 + 5 files changed, 154 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 6a3a377..09dbdb9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,7 +53,10 @@ SUBDIRS = \ src if HAVE_PLUGINS -...
2018 Aug 01
0
Re: [PATCH v2 nbdkit 4/6] common: Add a directory for common code shared by plugins and filters.
...ons which > > will be consumed by filters in later commits. > > --- > > Makefile.am | 5 +++- > > common/include/Makefile.am | 39 ++++++++++++++++++++++++ > > common/include/ispowerof2.h | 50 +++++++++++++++++++++++++++++++ > > common/include/iszero.h | 60 +++++++++++++++++++++++++++++++++++++ > > configure.ac | 1 + > > 5 files changed, 154 insertions(+), 1 deletion(-) > > > > diff --git a/Makefile.am b/Makefile.am > > index 6a3a377..09dbdb9 100644 > > --- a/Makefile.am > > +++ b/...
2019 Jan 01
0
[PATCH nbdkit v2 1/4] common/bitmap: Add bitmap_next function and tests.
...is not optimized since that is quite complicated - see to-do comments in common/include/nextnonzero.h). I wasn't confident about the correctness of the code and so this commit also adds some unit tests covering all of the bitmap code. --- common/bitmap/bitmap.h | 6 ++ common/include/iszero.h | 3 + common/include/nextnonzero.h | 59 +++++++++++++ common/bitmap/bitmap.c | 35 ++++++++ common/bitmap/test-bitmap.c | 162 +++++++++++++++++++++++++++++++++++ .gitignore | 1 + common/bitmap/Makefile.am | 12 +++ common/include/Makefile.am | 1 +...
2012 Apr 12
0
[LLVMdev] detection of constant diagonal matrix * vector
...stantFP* rightConst = dyn_cast<ConstantFP>(rightConsts[i]); // check if valid if (leftConst == NULL || rightConst == NULL) break; // check if at least one is zero if (!leftConst->isZero() && !rightConst->isZero()) break; // assign dependent on constant int index = leftIndex; ConstantFP* constant = leftConst; if (!rightConst->isZero()) {...
2020 Jan 30
2
Re: [PATCH libnbd] python: Add AIO buffer is_zero method.
...t 08:16:30AM -0600, Eric Blake wrote: > On 1/30/20 8:05 AM, Richard W.M. Jones wrote: > >Fast testing whether the AIO buffer (or regions within it) contain all > >zeroes, which allows Python code to quickly do sparsification when > >copying. > > > >This includes the iszero.h header from nbdkit which is distributed > >under a compatible license. > >--- > > common/include/Makefile.am | 5 +-- > > common/include/iszero.h | 63 +++++++++++++++++++++++++++++++++++++ > > generator/generator | 17 ++++++++-- > > python/Make...
2018 Jun 07
2
Matching ConstantFPSDNode tablegen
...PC_CheckInteger only checks for ConstantSDNode and not ConstantFPSDNode. So it was suggested to use ComplexPattern, so given: bool XXXDAGToDAGISel::SelectConstantFPSDNodeImmZero(SDValue In, SDValue &Src) const { if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(In)) return C->isZero(); return false; } def ConstantFPSDNodeImmZero : ComplexPattern<f32, 0, "SelectConstantFPSDNodeImmZero">; def : XXXPat<(v4f32 (int_foo i32:$dmask, f32:$s, (f32 (ConstantFPSDNodeImmZero f32:$lod)), v8i32:$rsrc, v4i32:$sampler, i1:$unorm, 0, i32:$cachepolicy)), (FOO_MI (COPY_TO...
2019 Jan 01
3
[PATCH nbdkit] include: Annotate function parameters with attribute((nonnull)).
Should we use attribute((nonnull)) at all? There's a very interesting history of this in libvirt -- try looking at commit eefb881 plus the commits referencing eefb881 -- but it does seem to work for me using recent GCC and Clang. I only did a few functions because annotating them gets old quickly... Rich.
2020 Jan 30
0
Re: [PATCH libnbd] python: Add AIO buffer is_zero method.
On 1/30/20 8:05 AM, Richard W.M. Jones wrote: > Fast testing whether the AIO buffer (or regions within it) contain all > zeroes, which allows Python code to quickly do sparsification when > copying. > > This includes the iszero.h header from nbdkit which is distributed > under a compatible license. > --- > common/include/Makefile.am | 5 +-- > common/include/iszero.h | 63 +++++++++++++++++++++++++++++++++++++ > generator/generator | 17 ++++++++-- > python/Makefile.am | 3 +-...
2020 Aug 18
0
[PATCH nbdkit 6/9] lib: Use replacement strategy for get_current_dir_name.
...ude/Makefile.am b/common/include/Makefile.am index 151c2ae4..a7d0d026 100644 --- a/common/include/Makefile.am +++ b/common/include/Makefile.am @@ -38,7 +38,6 @@ EXTRA_DIST = \ ascii-string.h \ byte-swapping.h \ exit-with-parent.h \ - get-current-dir-name.h \ isaligned.h \ ispowerof2.h \ iszero.h \ @@ -56,7 +55,6 @@ TESTS = \ test-ascii-ctype \ test-ascii-string \ test-byte-swapping \ - test-current-dir-name \ test-isaligned \ test-ispowerof2 \ test-iszero \ @@ -79,10 +77,6 @@ test_byte_swapping_SOURCES = test-byte-swapping.c byte-swapping.h test_byte_swapping_CPPFLAGS = -I$(...
2012 Apr 08
0
[LLVMdev] SIV tests in LoopDependence Analysis, Sanjoy's patch
...I can keep track of which is which. It > didn't matter so much when you were simply proving or disproving > dependence, but when you compute direction, it's suddenly crucial. > > The problem is the computation of direction from distance. The code says: > > if (distance->isZero()) > S->Direction = Subscript::EQ; > else if (isGT) > S->Direction = Subscript::GT; > else > S->Direction = Subscript::LT; > > > While it looks sensible, it's incorrect. Correct is > > > if (distance->isZero()) > S->Direction = Subscrip...
2013 Jul 22
6
[LLVMdev] Inverse of ConstantFP::get and similar functions?
...ue (checking for vectors matching the predicate in the vector case). For example: static bool ConstantFP::isExactlyValue(Value *V, double D); would return true is V is ConstantFP, a splat ConstantVector, or a ConstantDataVector with the appropriate type. Similarly, static bool ConstantFP::isZero(Value *V); would return true if V is a ConstantFP with zero of either sign, a ConstantVector or ConstantDataVector with all zeros of either sign, or a zero initializer... Anyone have any thoughts, and/or can point me to somewhere where this kind of thing is already implemented? Thanks, Stephen
2020 Jan 30
0
Re: [PATCH libnbd] python: Add AIO buffer is_zero method.
...Blake wrote: >> On 1/30/20 8:05 AM, Richard W.M. Jones wrote: >> >Fast testing whether the AIO buffer (or regions within it) contain all >> >zeroes, which allows Python code to quickly do sparsification when >> >copying. >> > >> >This includes the iszero.h header from nbdkit which is distributed >> >under a compatible license. >> >--- >> > common/include/Makefile.am | 5 +-- >> > common/include/iszero.h | 63 +++++++++++++++++++++++++++++++++++++ >> > generator/generator | 17 ++++++++-- &g...
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...stream. However the bug in GCC does appear to have been fixed at the end of 2016. https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=eefb881d4683d50882b43e5b28b0e94657cd0c9c https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17308 --- common/bitmap/bitmap.h | 18 ++++--- common/include/iszero.h | 2 +- common/include/random.h | 4 +- common/regions/regions.h | 19 ++++--- common/sparse/sparse.h | 12 +++-- filters/cache/blk.h | 17 ++++-- filters/cow/blk.h | 7 ++- filters/xz/blkcache.h |...