search for: defval

Displaying 20 results from an estimated 29 matches for "defval".

Did you mean: _defval
2014 Sep 01
0
[PATCH] nv50/ir: use unordered_set instead of list to keep track of var defs
...tions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index ca3c806..3138118 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -154,9 +154,9 @@ ValueDef::set(Value *defVal) if (value == defVal) return; if (value) - value->defs.remove(this); + value->defs.erase(this); if (defVal) - defVal->defs.push_back(this); + defVal->defs.insert(this); value = defVal; } diff --git a/src/gallium/drivers/nouveau/codegen/nv50_...
2014 Dec 02
0
[PATCH RESEND] nv50/ir: use unordered_set instead of list to keep track of var defs
...tions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index ca3c806..3138118 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -154,9 +154,9 @@ ValueDef::set(Value *defVal) if (value == defVal) return; if (value) - value->defs.remove(this); + value->defs.erase(this); if (defVal) - defVal->defs.push_back(this); + defVal->defs.insert(this); value = defVal; } diff --git a/src/gallium/drivers/nouveau/codegen/nv50_...
2019 Mar 29
0
[PATCH v2 1/3] common/mlpcre: add offset flag for PCRE.matches
...gt; string diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index 0762a8341..be054a004 100644 --- a/common/mlpcre/pcre-c.c +++ b/common/mlpcre/pcre-c.c @@ -121,6 +121,15 @@ is_Some_true (value v) Bool_val (Field (v, 0)) /* Some true */; } +static int +Optint_val (value intv, int defval) +{ + if (intv == Val_int (0)) /* None */ + return defval; + else /* Some int */ + return Int_val (Field (intv, 0)); +} + value guestfs_int_pcre_compile (value anchoredv, value caselessv, value dotallv, value extendedv, value multil...
2019 Feb 25
0
[PATCH 1/3] common/mlpcre: add offset flag for PCRE.matches
...gt; string diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index 0762a8341..be054a004 100644 --- a/common/mlpcre/pcre-c.c +++ b/common/mlpcre/pcre-c.c @@ -121,6 +121,15 @@ is_Some_true (value v) Bool_val (Field (v, 0)) /* Some true */; } +static int +Optint_val (value intv, int defval) +{ + if (intv == Val_int (0)) /* None */ + return defval; + else /* Some int */ + return Int_val (Field (intv, 0)); +} + value guestfs_int_pcre_compile (value anchoredv, value caselessv, value dotallv, value extendedv, value multil...
2009 Jul 31
2
merging two data frame with colomns of different length
Dear all, I am trying to merge two data frames based on a common column but for this common column both data frame do not have the same length and associated information. I checked previous exemples in the list but was not able to apply them in my case... Is someone know how to do that? Below is my code with the expected result: # data frame 1 Id1 <- c(1,1,1,2,2,2,3,3,3) Habit1 <-
2014 Dec 12
2
[PATCH RFC v6 05/20] virtio: support more feature bits
.../ > > extern PropertyInfo qdev_prop_bit; > +extern PropertyInfo qdev_prop_bit64; > extern PropertyInfo qdev_prop_bool; > extern PropertyInfo qdev_prop_uint8; > extern PropertyInfo qdev_prop_uint16; > @@ -51,6 +52,17 @@ extern PropertyInfo qdev_prop_arraylen; > .defval = (bool)_defval, \ > } > > +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ > + .name = (_name), \ > + .info = &(qdev_prop_bit64), \...
2014 Dec 12
2
[PATCH RFC v6 05/20] virtio: support more feature bits
.../ > > extern PropertyInfo qdev_prop_bit; > +extern PropertyInfo qdev_prop_bit64; > extern PropertyInfo qdev_prop_bool; > extern PropertyInfo qdev_prop_uint8; > extern PropertyInfo qdev_prop_uint16; > @@ -51,6 +52,17 @@ extern PropertyInfo qdev_prop_arraylen; > .defval = (bool)_defval, \ > } > > +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ > + .name = (_name), \ > + .info = &(qdev_prop_bit64), \...
2002 Aug 09
0
Automation of public/private key generation
...#################### # ## ++ yes_or_no() { # Takes two arguments, a PROMPT and the default value (Y | N). # Returns 0 if the user specified "Y", nonzero otherwise. # if [ ${#} -ne 2 ]; then return 1 fi if [ "${2}" = "Y" ]; then DEFPMPT="([Y]/N):\c " DEFVAL="Y" else DEFPMPT="(Y/[N]):\c " DEFVAL="N" fi echo "${1} ${DEFPMPT} \c" read ANS : ${ANS:="${DEFVAL}"} if [ "${ANS}" != "Y" -a "${ANS}" != "y" ]; then return 1 fi return 0 } # - ## ++ do_info() { e...
2014 Dec 12
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...64-bit right from the beginning, > I think you've got to use a temporary 32-bit variable to get this right. Hm... always store the old 32 bits here, then store the new 32 bits later? Should be able to get that compatible. > > +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ > > + .name = (_name), \ > > + .info = &(qdev_prop_bit64), \ > > No need for the paranthesis around qdev_prop_bit64 here? Straight copy&paste :) I'd prefer to keep the same sty...
2014 Dec 12
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...64-bit right from the beginning, > I think you've got to use a temporary 32-bit variable to get this right. Hm... always store the old 32 bits here, then store the new 32 bits later? Should be able to get that compatible. > > +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ > > + .name = (_name), \ > > + .info = &(qdev_prop_bit64), \ > > No need for the paranthesis around qdev_prop_bit64 here? Straight copy&paste :) I'd prefer to keep the same sty...
2020 Sep 23
6
[common PATCH 0/3] SELinux_relabel: relabel only if enforcing (RHBZ#1828952)
Continuation/rework of: https://www.redhat.com/archives/libguestfs/2020-May/msg00020.html This is my approach, as I explained here: https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c4 https://www.redhat.com/archives/libguestfs/2020-May/msg00035.html IOW: do not attempt to relabel if the guest is not enforcing, as it is either useless or may fail; few words more are in the comments of patch #3.
2019 Mar 29
5
[PATCH v2 0/3] v2v: add -o json output mode
This series adds a new output mode for virt-v2v, called -o json. It produces local files, just like -o local, although the metadata produced is a JSON file with data that v2v collected in the conversion process. This can be useful for converting to unsupported destinations, still based on QEMU/KVM. In addition to a simple different metadata, it offers a way to relocate the disks, with
2014 Dec 02
0
[PATCH RFC v5 05/19] virtio: support more feature bits
...features, supported_features); return -1; } diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 070006c..23d713b 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -51,6 +51,17 @@ extern PropertyInfo qdev_prop_arraylen; .defval = (bool)_defval, \ } +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ + .name = (_name), \ + .info = &(qdev_prop_bit), \ + .bitnr = (_bi...
2014 Dec 02
0
[PATCH RFC v5 05/19] virtio: support more feature bits
...features, supported_features); return -1; } diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 070006c..23d713b 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -51,6 +51,17 @@ extern PropertyInfo qdev_prop_arraylen; .defval = (bool)_defval, \ } +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ + .name = (_name), \ + .info = &(qdev_prop_bit), \ + .bitnr = (_bi...
2014 Dec 11
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...6,6 +6,7 @@ /*** qdev-properties.c ***/ extern PropertyInfo qdev_prop_bit; +extern PropertyInfo qdev_prop_bit64; extern PropertyInfo qdev_prop_bool; extern PropertyInfo qdev_prop_uint8; extern PropertyInfo qdev_prop_uint16; @@ -51,6 +52,17 @@ extern PropertyInfo qdev_prop_arraylen; .defval = (bool)_defval, \ } +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ + .name = (_name), \ + .info = &(qdev_prop_bit64), \ + .bitnr = (_...
2014 Dec 11
0
[PATCH RFC v6 05/20] virtio: support more feature bits
...6,6 +6,7 @@ /*** qdev-properties.c ***/ extern PropertyInfo qdev_prop_bit; +extern PropertyInfo qdev_prop_bit64; extern PropertyInfo qdev_prop_bool; extern PropertyInfo qdev_prop_uint8; extern PropertyInfo qdev_prop_uint16; @@ -51,6 +52,17 @@ extern PropertyInfo qdev_prop_arraylen; .defval = (bool)_defval, \ } +#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \ + .name = (_name), \ + .info = &(qdev_prop_bit64), \ + .bitnr = (_...
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. If you see issues or are just curious, you can turn the new feature off. For example: -global virtio-net-pci.event_idx=on -global virtio-blk-pci.event_idx=off Also, it's possible to try both
2011 May 19
2
[PATCHv2 0/2] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. If you see issues or are just curious, you can turn the new feature off. For example: -global virtio-net-pci.event_idx=on -global virtio-blk-pci.event_idx=off Also, it's possible to try both
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not spend a lot of time testing performance. I hope others will try this out and report. Note: there
2011 May 04
4
[PATCH 0/3] virtio-net: 64 bit features, event index
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not spend a lot of time testing performance. I hope others will try this out and report. Note: there