Displaying 17 results from an estimated 17 matches similar to: "Using a custom memory allocation function in R"
2011 Jun 06
2
[LLVMdev] PBQP & register pairing
Hi All,
My target has some instructions requiring register pairs. I decided to give a try to the PBQP allocator : it is working fine in 99% of the cases, but I am stumbling on the following issue.
Instruction 'MPQD' takes 3 register operands inputs, with the constraint that operands 0 and 2 must be consecutive registers. Operand 1 has no particular constraint. It has no output register.
2011 Jun 06
0
[LLVMdev] PBQP & register pairing
On Jun 6, 2011, at 7:07 AM, Arnaud Allard de Grandmaison wrote:
> Hi All,
>
> My target has some instructions requiring register pairs. I decided to give a try to the PBQP allocator : it is working fine in 99% of the cases, but I am stumbling on the following issue.
>
> Instruction ‘MPQD’ takes 3 register operands inputs, with the constraint that operands 0 and 2 must be
2017 Mar 29
3
Transferring ownership of R-managed buffer
I have a use case where I would like to create an SEXP around an existing
buffer that is managed by R, thus avoiding a copy operation. If I have
something like:
void *p = (void*) RAW(PROTECT(Rf_allocVector(RAWSXP, n)));
... additional maniupulation ...
SEXP x = somefunc(SXPTYPE, n, p); // ????
Is there a "placement" constructor available? (I have arranged for the
corresponding
2019 May 19
4
most robust way to call R API functions from a secondary thread
Hi,
As the subject suggests, I am looking for the most robust way to call an (arbitrary) function from the R API from another but the main POSIX thread in a package's code.
I know that, "[c]alling any of the R API from threaded code is ?for experts only? and strongly discouraged. Many functions in the R API modify internal R data structures and might corrupt these data structures if
2001 Apr 03
3
single-pass algorithm for quantile calculation
Dear R users, I am looking for a reference to an algorithm for estimation of
sample quantiles which does not require bringing the whole data into memory
(more precisely its memory complexity should be much less than linear,
ideally constant). I realize that such an algorithm can only be approximate
and actually quite wrong for some samples, but that's fine with me.
Thank you,
Vadim
2017 Mar 29
2
Transferring ownership of R-managed buffer
http://www.keittlab.org/
On Wed, Mar 29, 2017 at 1:04 PM, Herv? Pag?s <hpages at fredhutch.org> wrote:
> Hi Tim,
>
> On 03/29/2017 08:24 AM, Tim Keitt wrote:
>
>> I have a use case where I would like to create an SEXP around an existing
>> buffer that is managed by R, thus avoiding a copy operation.
>>
>
> What to you mean exactly by "an existing
2006 Oct 24
15
How to emit associative array after ^C
Boy am I a dummy. I want to simply dump out unfreed allocations when I terminate the script. What''s the secret sauce?
#!/usr/sbin/dtrace -s
pid$1::MyAlloc:return
{
bufs[arg1] = walltimestamp;
}
pid$1::MyFree:entry
/bufs[arg0]/
{
bufs[arg0] = 0;
}
This message posted from opensolaris.org
2013 Sep 12
10
[PATCH] xen/build: Remove hacked up version of figlet
This hacked up version of figlet contributes a supprisingly large proportion
of the Coverity issues found under xen/ (and therefore attributed against Xen)
Figlet can be found in all distros, so make use of it.
We keep xen.flf (being the Xen figlet font) and replace the hacked up octal
transform with a short python script.
The Xen Makefile has been tweaked in such a way that it still prints the
2019 May 20
1
most robust way to call R API functions from a secondary thread
Stepan,
Andreas gave a lot more thought into what you question in your reply. His question was how you can avoid what you where proposing and have proper threading under safe conditions. Having dealt with this before, I think Andreas' write up is pretty much the most complete analysis I have seen. I'd wait for Luke to chime in as the ultimate authority if he gets to it.
The
2011 Jun 06
2
[LLVMdev] PBQP & register pairing
Arnaud,
another way to look at it, if the description of your
register sets includes "pairs",
is that your assembly language syntax for MPQD is redundant,
operand-2 is the second
half of the register-pair in operand-0, so an alternative is to let
llvm think this is a two
operand instruction (one of them being a pair) rather than a three
operand instruction.
even
2016 Apr 02
2
getSymbolAddressInProcess returning null
Tried that, still didn't work. Then I tried making a direct API call,
GetProcAddress(GetModuleHandle(0),"foo")
And this works if and only if __declspec(dllexport) is supplied. So it
looks like we were both right.
On Sat, Apr 2, 2016 at 9:29 AM, NAKAMURA Takumi <geek4civic at gmail.com>
wrote:
> Have you tried to add dllexport?
>
> On Sat, Apr 2, 2016 at 4:23 PM
2017 Mar 29
0
Transferring ownership of R-managed buffer
Hi Tim,
On 03/29/2017 08:24 AM, Tim Keitt wrote:
> I have a use case where I would like to create an SEXP around an existing
> buffer that is managed by R, thus avoiding a copy operation.
What to you mean exactly by "an existing buffer managed by R"?
> If I have
> something like:
>
> void *p = (void*) RAW(PROTECT(Rf_allocVector(RAWSXP, n)));
> ... additional
2017 Mar 29
0
Transferring ownership of R-managed buffer
Tim,
What you're describing is a special case of the ALTREP framework/API that
Luke Tierney, Tomas Kalibera, and I are working on putting into R. See my
initial proposal to the DSC here:
https://www.r-project.org/dsc/2016/slides/customvectors.html and the
subsequent branch here: https://svn.r-project.org/R/branches/ALTREP/ where
Luke and I have merged the ideas from that proposal with work he
2019 May 20
0
[External] most robust way to call R API functions from a secondary thread
Your analysis looks pretty complete to me and your solutions seems
plausible. That said, I don't know that I would have the level of
confidence yet that we haven't missed an important point that I would
want before going down this route.
Losing stack checking is risky; it might be eventually possible to
provide some support for this to be handled via a thread-local
variable. Ensuring
2019 May 20
0
most robust way to call R API functions from a secondary thread
Hi Andreas,
note that with the introduction of ALTREP, as far as I understand, calls
as "simple" as DATAPTR can execute arbitrary code (R or native). Even
without ALTREP, if you execute user-provided R code via Rf_eval and such
on some custom thread, you may end up executing native code of some
package, which may assume it is executed only from the R main thread.
Could you (1)
2016 Jul 21
2
RFC: LLVM Coroutine Representation, Round 2
cc llvm-dev
On Thu, Jul 21, 2016 at 9:57 AM, Vadim Chugunov <vadimcn at gmail.com> wrote:
> Hi Gor,
> Does you design support resumption with parameter(s)? (such as Python's
> generator.send(x)). I suppose the "promise" could be used for passing data
> both ways, but if that's the plan, please mention this explicitly in the
> design doc.
> Also, how is
2008 Jun 30
4
Rebuild of kernel 2.6.9-67.0.20.EL failure
Hello list.
I'm trying to rebuild the 2.6.9.67.0.20.EL kernel, but it fails even without
modifications.
How did I try it?
Created a (non-root) build environment (not a mock )
Installed the kernel.scr.rpm and did a
rpmbuild -ba --target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee
prep-out.log
The build failed at the end:
Processing files: kernel-xenU-devel-2.6.9-67.0.20.EL
Checking