similar to: Unsigned Bitwise Shift for Bit-field Structure

Displaying 20 results from an estimated 10000 matches similar to: "Unsigned Bitwise Shift for Bit-field Structure"

2019 Jun 13
2
[RFC] Coding Standards: "prefer `int` for regular arithmetic, use `unsigned` only for bitmask and when you intend to rely on wrapping behavior."
FWIW, the talks linked by Mehdi really do talk about these things and why I don't think the really are the correct trade-off. Even if you imagine an unsigned type that doesn't allow wrapping, I think this is a really bad type. The problem is that you have made the most common value of the type (zero in every study I'm aware of) be a boundary condition. Today, it wraps to a huge value
2008 Aug 07
1
'"ts" treated as a registered S3 class, but keep its "structure" behaviour' ?
Dear all, In R-devel I have noticed the new approach for the "ts" class in the package "methods". the "structure" behaviour of "ts" is not always kept when one uses "ts" objects and objects of classes which extend the virtual class "structure". As a short example: ## this works fine setClass("foo", representation(header =
2011 Sep 06
2
[LLVMdev] bitwise AND
Hi, I want to compute the bitwise 'and' between two values of type int1:  %x = and %a, %b  . Which is the LLVM instruction that creates this? I only found the APInt class, whose constructor is:  APInt(unsigned numBits, uint64_t val, bool isSigned = false) and which provides the bitwise AND operation: APInt  llvm::APIntOps::And (const APInt &LHS, const APInt &RHS)   Bitwise
2009 Jun 09
1
Bitwise AND
Hello, How can I do bitwise AND operations on a variable? I want to check the bits set in the HANGUPCAUSE, but can't find a way to do it. -- Alex Hermann
2012 Oct 22
2
bitwise XOR of Matrix
Hi, I would like to xor (bitwise) two matrices filled with binary values (0,1). The result of such XOR is expected to be 0,1. But apparently neither of xor nor bitXor is working in this case. I got ": binary operation on non-conformable arrays" error message when I used xor (M1,M2) . The problem with bitXor(M1,M2) is that it just truncates the result into a vector rather than a
2007 Apr 24
1
bitmask(bitwise operation) support in Ferret
Hi, in my person model, I have a enumeration field "role" that take bits like 1, 2, 4, 8, 16, ..... they represent person roles(eg: admin(1), QA(2), manager(4) .... ). Each person can take on multiple roles. say there''s person A that''s both a admin and QA(the role value is "3") so if I search like "Person.find_by_content(''role:(1))", I
2015 Nov 25
3
IP table Restore
modinfo: ERROR: Module alias ip_tables not found. Linux ns1.currencybooking.com 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Shiva Prasad Nath 92981134 On Thu, Nov 26, 2015 at 4:46 AM, Fabian Arrotin <arrfab at centos.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 25/11/15 10:29, Siva Prasad Nath wrote:
2018 Apr 27
4
[PATCH] allow indefinite ForwardX11Timeout by setting it to 0
This change allows use of untrusted X11 forwarding (which is more secure) without requiring users to choose a finite timeout after which to refuse new connections. This matches the semantics of the X11 security extension itself, which also treat a validity timeout of 0 on an authentication cookie as indefinite. Signed-off-by: Trixie Able <table at inventati.org> --- clientloop.c | 12
2015 Jun 26
3
[LLVMdev] bitwise ops on booleans
Hi Language Lawyers! In PR23827 ( https://llvm.org/bugs/show_bug.cgi?id=23827 ), a bitwise op on booleans is considered equivalent to a logical op: if ((x < 3) & (y > 10)) effectively becomes: if ((x < 3) && (y > 10)) where x and y are of type 'int'. The second statement (&&) requires short-circuit evaluation to bypass the y comparison when the x
2008 Feb 07
0
Ogg bitwise.c bit tracking
On 2/7/08, Ralph Giles <ralph.giles@artifex.com> wrote: > And theora, remember. Actually, I thought I remember derf doing that. And there it was on Trac's timeline. Look at changeset 14369: "Copy the libogg bitpacker directly into libtheoradec. Due to the vagaries of -fPIC and dynamic linking, we wasting a _huge_ amount of time on function call overhead. We also take the
2008 Feb 08
2
Ogg bitwise.c bit tracking
It's very small, maybe it could be made a separate statically linked lib ? Or some of it inlined. That said, libogg is small too, and some of the routines in there are quite small as well.
2016 Dec 07
4
Killing undef and spreading poison
>> 1) a bit in the output is poison if flipping any set of poison bits >> in the >> input may yield different values for the output bit. > > This is the definition I'd expect. > >> For example (bitwise notation): >> ppp * 000 == 000 (since flipping any of the poison bits cannot yield >> a >> result other than zero) >> 00p + 00p == 0pp
2008 Feb 08
2
Ogg bitwise.c bit tracking
On 09/02/2008, Ralph Giles <giles@xiph.org> wrote: > Yes, all that is reasonable. The original argument was that we need a > library anyway, no one noticed the function call overhead, and using > libogg simplified the embedding. > > Now, we'd like to remove libogg entirely as a dependency to avoid > confusion when using other containers, but that's an api change...
2015 Jan 14
1
[PULL] uaccess: fix sparse warning on get/put_user for bitwise types
Hello, Arnd, As you asked, here's a pull request. This has been in linux-next apparently with no ill effects. The following changes since commit 99975cc6ada0d5f2675e83abecae05aba5f437d2: vhost/net: length miscalculation (2015-01-07 12:22:00 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/uaccess_for_upstream for you to
2015 Jan 14
1
[PULL] uaccess: fix sparse warning on get/put_user for bitwise types
Hello, Arnd, As you asked, here's a pull request. This has been in linux-next apparently with no ill effects. The following changes since commit 99975cc6ada0d5f2675e83abecae05aba5f437d2: vhost/net: length miscalculation (2015-01-07 12:22:00 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/uaccess_for_upstream for you to
2008 Feb 12
1
Ogg bitwise.c bit tracking
Ivo Emanuel Gon?alves wrote: > And IF that kind of performance can be gained in libvorbis too, the > question is, what are we waiting for? I doubt the performance gain would be that large. Theora had the fun little situation where it was thunking into the big endian version of some bitpacker functions which were one-line calls to the little endian version. Because gcc seemed to be
2010 Oct 11
2
[patch 1/2] vhost: potential integer overflows
I did an audit for potential integer overflows of values which get passed to access_ok() and here are the results. Signed-off-by: Dan Carpenter <error27 at gmail.com> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index dd3d6f7..c2aa12c 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -429,6 +429,14 @@ static int vq_access_ok(unsigned int num, struct
2010 Oct 11
2
[patch 1/2] vhost: potential integer overflows
I did an audit for potential integer overflows of values which get passed to access_ok() and here are the results. Signed-off-by: Dan Carpenter <error27 at gmail.com> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index dd3d6f7..c2aa12c 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -429,6 +429,14 @@ static int vq_access_ok(unsigned int num, struct
2006 Mar 14
2
[OT] Comments wanted on use of bitwise op
Here''s the scenario. I have a main tree-like table (actually it''s more of a hierarchy), where the entries (or at least some of them) can be categorised as one or more of a fixed number of types (prob about 6 poss types). So an entry could be a Type A and a Type D; a Type C, D, E; just a Type F; etc. Having a join table would seem like it might get rather expensive since
2009 Jun 26
0
[LLVMdev] bitwise AND selector node not commutative?
On Jun 25, 2009, at 4:38 PM, David Goodwin wrote: > Using the Thumb-2 target we see that ORN ( a | ^b) and BIC (a & ^b) > have similar patterns, as we would expect: > > defm t2BIC : T2I_bin_irs<"bic", BinOpFrag<(and node:$LHS, (not node: > $RHS))>>; > defm t2ORN : T2I_bin_irs<"orn", BinOpFrag<(or node:$LHS, (not node: >