search for: vtype

Displaying 20 results from an estimated 47 matches for "vtype".

Did you mean: type
2007 Oct 12
3
collapsing a data frame
...ns. Here's a solution that takes the first element of each factor and the mean of each numeric variable. I can imagine there are more general/flexible solutions. (One might want to specify more than one summary function, or specify that factors that vary within group should be dropped.) vtype = sapply(h,class) ## variable types [numeric or factor] vtypes = unique(vtype) ## possible types v2 = lapply(vtypes,function(z) which(vtype==z)) ## which are which? cfuns = list(factor=function(z)z[1],numeric=mean)## functions to apply m = mapply(function(w,f) { aggregate(h[w],list(h$BROOD),f)...
2019 Sep 23
2
What is the best way to loop over an ALTREP vector?
Sorry for post a lot of things, for the first part of code, I copied my C++ iter macro by mistake(and you can see an explicit type casting). Here is the macro definition from R_exts/Itermacros.h #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr) do { \ * const** etype *px = DATAPTR_OR_NULL(sx); * \ if (px != NULL) { \ R_xlen_t __ibr_n__ = strt + nfull; \ R_x...
2008 Jan 04
7
[LLVMdev] Calling functions across modules. And those pesky vectors!
...ere fairly well, but I can't seem to get a simple function which takes in and returns vectors to work properly. And I don't understand the error. I made a simple function which was just supposed to multiply two 3 component float vectors and return the result: //Snip on: VectorType *vType = VectorType::get(Type::FloatTy, 3); std::vector<const Type*> Vectors(2, vType); FunctionType *mul_type = FunctionType::get(vType, Vectors, false); Function* mul = new Function(mul_type, Function::ExternalLinkage, "mul", mod); mul->setCalling...
2019 Sep 24
2
What is the best way to loop over an ALTREP vector?
...; Sorry for post a lot of things, for the first part of code, I copied my > C++ > > iter macro by mistake(and you can see an explicit type casting). Here is > > the macro definition from R_exts/Itermacros.h > > > > #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ > > > > strt, nfull, expr) do { \ > > > > * const** etype *px = DATAPTR_OR_NULL(sx); * > \ > > > > if (px != NULL) { \ > > > > R_xlen_t...
2019 Feb 05
4
[RFC] Vector Predication
On 2/5/19 1:27 AM, Philip Reames via llvm-dev wrote: > > On 1/31/19 4:57 PM, Bruce Hoult wrote: >> On Thu, Jan 31, 2019 at 4:05 PM Philip Reames via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >>> Do such architectures frequently have arithmetic operations on the >>> mask registers?  (i.e. can I reasonable compute a conservative >>> length
2019 Sep 24
0
What is the best way to loop over an ALTREP vector?
...com> wrote: > > Sorry for post a lot of things, for the first part of code, I copied my C++ > iter macro by mistake(and you can see an explicit type casting). Here is > the macro definition from R_exts/Itermacros.h > > #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ > > strt, nfull, expr) do { \ > > * const** etype *px = DATAPTR_OR_NULL(sx); * \ > > if (px != NULL) { \ > > R_xlen_t __ibr_n__ = strt + nfull;...
2019 Aug 28
3
What is the best way to loop over an ALTREP vector?
Hi devel team, I'm working on C/C++ level ALTREP compatibility for a package. The package previously used pointers to access the data of a SEXP, so it would not work for some ALTREP objects which do not have a pointer. I plan to rewrite the code and use functions like get_elt, get_region, and get_subset to access the values of a vector, so I have a few questions for ALTREP: 1. Since an
2015 Nov 13
1
[PATCH v2] inspection: Fix detection of the kernel version of Windows ≥ 10 (RHBZ#1281578).
This fixes v1 by checking the correct length field. I have tested this against Windows 10 and it works. Rich.
2019 Oct 23
2
Unexpected behavior when using macro to loop over vector
...xt/Itermacros.h" to loop over an atomic vector. Here is a minimum example: C++ code ``` #include "R_ext/Itermacros.h" #define GET_REGION_BUFSIZE 2 //Redefine the macro since C++ is not happy with the implicit type conversion #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr) do { \ const etype *px = (etype*)DATAPTR_OR_NULL(sx); \ if (px != NULL) { \ R_xlen_t __ibr_n__ = strt + nfull; \ R_xlen_t nb = __ibr_n__; \ for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ expr \ } \ } \ else ITERATE_BY_REGION_PARTIAL0(sx, px, idx, nb...
2019 Feb 05
3
[RFC] Vector Predication
...t; The way it has ended up (very unlikely to change now) is: > > - any given RVV vector unit has 32 registers each with the same and > fixed length in bits. > > - the vector unit is configured by the VSETVL[I] instruction which has > two arguments: 1) the requested AVL, and 2) the vtype (vector type). > > - The vtype is an integer with several small fields, of which two are > currently defined (the other bits must be zero). The fields are the > Standard Element Width and VLMul. SEW can be any power of 2 from 8 > bits up to some implementation-defined maximum (1024 b...
2019 Oct 25
2
Unexpected behavior when using macro to loop over vector
...example: >> >> C++ code >> ``` >> #include "R_ext/Itermacros.h" >> #define GET_REGION_BUFSIZE 2 >> //Redefine the macro since C++ is not happy with the implicit type >> conversion >> #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ >> ? strt, nfull, expr) do { \ >> const etype *px = (etype*)DATAPTR_OR_NULL(sx); \ >> if (px != NULL) { \ >> ??? R_xlen_t __ibr_n__ = strt + nfull; \ >> ??? R_xlen_t nb = __ibr_n__; \ >> ??? for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ >>...
2019 Sep 23
0
What is the best way to loop over an ALTREP vector?
...itten in C and does an implicit type conversion(const void * to const int *), see below. While it is allowed in C, C++ seems not happy with it. Is it possible to add an explicit type casting so that it can be compatible with both language? #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr) do { \ *const etype *px = (const** etype *)DATAPTR_OR_NULL(sx); * \ if (px != NULL) { \ R_xlen_t __ibr_n__ = strt + nfull; \ R_xlen_t...
2016 Oct 24
2
RFC: (Co-)Convergent functions and uniform function parameters
...osal, e.g. if this can be solved in an easier way or if there are obvious problems with this approach. Thanks, Nicolai .......... In a nutshell, the problem that this intends to solve is that: %v1 = texelFetch(%sampler, %coord0) %v2 = texelFetch(%sampler, %coord1) %v = select i1 %cond, vType %v1, %v2 is logically equivalent to and could benefit from being transformed to, %coord = select i1 %cond, cType %coord0, %coord1 %v = texelFetch(%sampler, %coord) but on the other hand %v1 = texelFetch(%sampler0, %coord) %v2 = texelFetch(%sampler1, %coord) %v = select i1 %cond,...
2008 Jan 04
0
[LLVMdev] Vectors and function calls across modules
...using vectors of floats within llvm, but my first stab at it proved unsuccessful. Here's what I tried: a simple function which takes in 2 vectors, multiplies them, and returns the result. Here's the relevant code for making the function ("mul"): //Code snip start VectorType *vType = VectorType::get(Type::FloatTy, 3); std::vector<const Type*> Vectors(2, vType); FunctionType *mul_type = FunctionType::get(vType, Vectors, false); Function* mul = new Function(mul_type, Function::ExternalLinkage, "mul", mod); mul->setCallingConv(CallingConv::C...
2005 Feb 28
0
Re: R-help Digest, Vol 24, Issue 28
...#39;, ] Additionally, you might like to ponder > type <- races2000[names(races2000)=="type"] > type[1:4] Error in "[.data.frame"(type, 1:4) : undefined columns selected > length(type) # type is a data frame with 1 column [1] 1 > vtype <- unlist(type) # Extract the vector that is the one # data frame (list) element > vtype[1:4] # Try also length(vtype) type.type1 type.type2 type.type3 type.type4 "uphill" "other" "...
2016 Oct 24
2
RFC: (Co-)Convergent functions and uniform function parameters
...ms with this approach. >> >> Thanks, >> Nicolai >> >> .......... >> In a nutshell, the problem that this intends to solve is that: >> >> %v1 = texelFetch(%sampler, %coord0) >> %v2 = texelFetch(%sampler, %coord1) >> %v = select i1 %cond, vType %v1, %v2 >> >> is logically equivalent to and could benefit from being transformed to, >> >> %coord = select i1 %cond, cType %coord0, %coord1 >> %v = texelFetch(%sampler, %coord) >> >> but on the other hand >> >> %v1 = texelFetch(%sampler0, %...
2013 Jan 06
1
[PATCH] menugen: Make it compatible with Py3k
...ns(+), 28 deletions(-) diff --git a/com32/cmenu/menugen.py b/com32/cmenu/menugen.py index 70ec1f8..da64d93 100644 --- a/com32/cmenu/menugen.py +++ b/com32/cmenu/menugen.py @@ -72,9 +72,9 @@ class Menusystem: self.init_entry() self.init_menu() self.init_system() - self.vtypes = " OR ".join(self.types.keys()) - self.vattrs = " OR ".join(filter(lambda x: x[0] != "_", self.entry.keys())) - self.mattrs = " OR ".join(filter(lambda x: x[0] != "_", self.menu.keys())) + self.vtypes = " OR ".join(list...
2012 Aug 22
1
(Slight) calculation discrepancy in escalc (metafor package)
....6-0) in R (2.15.1, 64-bit Windows 7) and noticed that I was getting slightly different values when I manually calculated the standardized mean difference versus what escalc was giving me. Here''s a very simple example: escalc(measure="SMD", m1i=5,m2i=10,n1i=5,n2i=5,sd1i=1,sd2i=2,vtype="LS") The result is: yi vi 1 -2.854599 0.8074367 However, if I calculate this manually using the pooled standard deviation formula given in Cooper et al (2009)*, I get an SMD of -2.85625 and a variance of 0.870205. The formula given in Cooper et al for the pooled st...
2019 Sep 30
3
Adding support for vscale
On Tuesday, October 1, 2019, Jacob Lifshay <programmerjake at gmail.com> wrote: > On Mon, Sep 30, 2019 at 2:30 AM Sander De Smalen via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > > > I've posted two patches on Phabricator to add support for VScale in LLVM. Excellent! > > > > A brief recap on `vscale`: > > The scalable vector type in
2019 Oct 25
0
Unexpected behavior when using macro to loop over vector
...c vector. Here is a minimum > example: > > C++ code > ``` > #include "R_ext/Itermacros.h" > #define GET_REGION_BUFSIZE 2 > //Redefine the macro since C++ is not happy with the implicit type > conversion > #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ > strt, nfull, expr) do { \ > const etype *px = (etype*)DATAPTR_OR_NULL(sx); \ > if (px != NULL) { \ > R_xlen_t __ibr_n__ = strt + nfull; \ > R_xlen_t nb = __ibr_n__; \ > for (R_xlen_t idx = strt; idx < __ibr_n__; idx += nb) { \ > expr \ > } \ > }...