search for: vtypes

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

Did you mean: types
2007 Oct 12
3
collapsing a data frame
...ch 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) }, v2,cfuns,SIMPLIFY=FALSE) data.frame(m[[1]],m[[2]][-1]) M...
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); *
2008 Jan 04
7
[LLVMdev] Calling functions across modules. And those pesky vectors!
Before I get started with more questions, thanks for the prompt reply on my last set question, that was much appreciated. First, I found references to lazy inling and optimizations for calling functions across modules, but I can't figure out how to do that. If I just take a Function* that I got out of one module and call it from the other, it doesn't work. What's the general
2019 Sep 24
2
What is the best way to loop over an ALTREP vector?
Hi Bob, Thanks for sending around the link to that. It looks mostly right and looks like a useful onramp. There are a few things to watch out for though (I've cc'ed Romain so he's aware of these comments). @romain I hope you taake the following comments as they are intended, as help rather than attacks. The largest issue I see is that the contract for Get_region is that it *populates
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?
Not sure if you're using just C++ or Rcpp for C++ access but https://purrple.cat/blog/2018/10/14/altrep-and-cpp/ has some tips on using C++ w/ALTREP. > On Sep 23, 2019, at 3:17 PM, Wang Jiefei <szwjf08 at gmail.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
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
Hi all, I found an unexpected behavior when I was trying to use the macro defined in "R_ext/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,
2019 Feb 05
3
[RFC] Vector Predication
On 2/5/19 12:06 PM, Bruce Hoult wrote: > On Tue, Feb 5, 2019 at 1:23 AM Simon Moll <moll at cs.uni-saarland.de> wrote: >> I think this is the usual mixup of AVL and MVL. >> >> AVL: is part of the predicate and can change between vector operations >> just like a mask can (light weight). >> >> MVL: Is the physical vector register length and can be
2019 Oct 25
2
Unexpected behavior when using macro to loop over vector
On 10/25/19 11:01 AM, Tomas Kalibera wrote: > On 10/23/19 6:45 AM, Wang Jiefei wrote: >> Hi all, >> >> I found an unexpected behavior when I was trying to use the macro >> defined >> in "R_ext/Itermacros.h"? to loop over an atomic vector. Here is a >> minimum >> example: >> >> C++ code >> ``` >> #include
2019 Sep 23
0
What is the best way to loop over an ALTREP vector?
Hi Gabriel, I have tried the macro and found a small issue, it seems like the macro is written 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,
2016 Oct 24
2
RFC: (Co-)Convergent functions and uniform function parameters
Hi all, Some brain-storming on an issue with SPMD/SIMT backend support where I think some additional IR attributes would be useful. Sorry for the somewhat long mail; the short version of my current thinking is that I would like to have the following: 1) convergent: a call to a function with this attribute cannot be moved to have additional control dependencies; i.e., moving it from A to B is
2008 Jan 04
0
[LLVMdev] Vectors and function calls across modules
Hey all, thanks for your prompt replies from before, now I have more questions! First, I've heard rumors about the ability to call functions across modules. I'm interested in learning how, but I haven't been able to figure it out yet. I tried just taking a Function* that I got from one module and calling it from another one, but that didn't work. How do I do that? Second,
2005 Feb 28
0
Re: R-help Digest, Vol 24, Issue 28
You've omitted a comma. races2000 is a data frame, which for purposes of extracting rows behaves like a 2-dimenional object. The following works fine: hills2000 <- races2000[races2000$type == 'hill', ] Additionally, you might like to ponder > type <- races2000[names(races2000)=="type"] > type[1:4] Error in "[.data.frame"(type, 1:4) :
2016 Oct 24
2
RFC: (Co-)Convergent functions and uniform function parameters
On 24.10.2016 21:54, Mehdi Amini wrote: >> On Oct 24, 2016, at 12:38 PM, Nicolai Hähnle via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Some brain-storming on an issue with SPMD/SIMT backend support where I think some additional IR attributes would be useful. Sorry for the somewhat long mail; the short version of my current thinking is that I would like to have the following:
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)
Hello, I recently started using the metafor package (version 1.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
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
On 10/23/19 6:45 AM, Wang Jiefei wrote: > Hi all, > > I found an unexpected behavior when I was trying to use the macro defined > in "R_ext/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