similar to: Manipulating single-precision (float) arrays in .Call functions

Displaying 20 results from an estimated 10000 matches similar to: "Manipulating single-precision (float) arrays in .Call functions"

2011 Jul 22
2
Best practices for writing R functions
I am developing an R package for internal use, and eventually for public release. My understanding is that there is no easy way to avoid copying function arguments in R (i.e. we don't have the concept of pointers in R), which makes me wary of freely creating chains of function calls since each function call implies data copy overhead. Is the above assessment fair? Are there any good write-ups
2011 Jul 13
1
Performance of .C and .Call functions vs. native R code
Hello, I am in the process of writing an R extension for parallelized MCMC, with heavy use of compiled code (C++). I have been getting my feet wet by implementing a simple matrix-vector multiplication function in C++ (which calls a BLAS level 2 function dgemv), and comparing it to the '%*%' operator in R (which apparently calls a BLAS level 3 function dgemm). Interestingly, I cannot
2011 Sep 20
2
Is it possible to pass a function argument from R to compiled code in C?
I have a function in R that takes another function as argument: f <- function(g, ...) { #g is expected to be a function } I want to see if there is a way to implement "f" in C and calling it from R using ".C" interface. I know that I can use function pointers for my C implementation, but I imagine it's going to be nearly impossible to pass a function from R to C. Are
2011 Aug 29
3
How to safely using OpenMP pragma inside a .C() function?
I am trying to parallelize part of a C function that is called from R (via .C) using OpenMP's "parallel for" pragma. I get mixed results: some runs finish with no problem, but some lead to R crashing after issuing a long error message involving memory violations. I found this post, which describes how a .Call() function can be made to avoid crashing R by raising the stack limit:
2012 Jul 27
2
Assigning a new name to object loaded with "load()"
I would like to load a binary file into R using load(), and then assign a new name to it, regardless of the name it was saved under. Can you please provide a code sample? Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Assigning-a-new-name-to-object-loaded-with-load-tp4638144.html Sent from the R help mailing list archive at Nabble.com.
2009 Mar 12
0
[LLVMdev] promotion of return value.
Previously we talked about adding new attributes to function to identify the promotion class. > sign_ext_from_i8, sign_ext_from_i16 > zero_ext_from_i8, zero_ext_from_i16 Aren't these attributes more applicable to return value? of course then the question would be if they are also applicable to parameters too? (because we use same attributes for parameters and return value)? or
2020 Nov 16
1
lld error: output file too large <some large number>
This is a common pitfall: people think that .text is the first section of the traditional concept "text segment" (which does not apply with LLD layout and GNU ld's -z separate-code layout) You need to use --image-base=0 https://releases.llvm.org/10.0.0/tools/lld/docs/ReleaseNotes.html#breaking-changes On Mon, Nov 16, 2020 at 10:31 AM Moshtaghi, Alireza <Alireza.Moshtaghi at
2017 Dec 20
2
Question about : lprofValueProfNodes
What Vedant said -- the profiler runtime provides buffer API for profile dumping. Note that value profiling dumping is not yet supported for buffer API, but since you are using Front-end based instrumentation/profile-use, value profiler is not turned on by default anyway. David On Tue, Dec 19, 2017 at 5:29 PM, Vedant Kumar <vsk at apple.com> wrote: > > On Dec 19, 2017, at 5:16 PM,
2020 Nov 16
2
lld error: output file too large <some large number>
I can't send the exact objects, but I'll try to reproduce. Thanks A On 11/16/20, 9:48 AM, "Fāng-ruì Sòng" <maskray at google.com> wrote: NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe. On Mon, Nov 16, 2020 at 9:05 AM Moshtaghi, Alireza
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
Further pursuing my curiosity to measure the efficiency of R/C++ interface, I conducted a simple matrix-vector multiplication test using .C and .Call functions in R. In each case, I measured the execution time in R, as well as inside the C++ function. Subtracting the two, I came up with a measure of overhead associated with each call. I assume that this overhead would be non-existent of the entire
2009 Mar 04
7
[LLVMdev] promotion of return value.
Below I have pasted the latest design that we discussed... Now we would like to pick it up and do the implementation. 1) Is there any last change that we would like to add? 2) Has anyone been working on it? I haven't seen any thing new in the code so I assume the answer is no... Thanks Alireza Moshtaghi Senior Software Engineer Development Systems, Microchip Technology Subject: Troubling
2008 Feb 01
1
[LLVMdev] C embedded extensions and LLVM
Christopher, Thank you for all the work :-) Regarding the regression testing, it is in our plan to contribute into LLVM. The current state of our project is not in the form that we can do this at this time though, but I'm hoping that we can get some minimal functionality into LLVM before LLVM 2.3 (at most LLVM 2.4) release. Looks like you have also (at least on your local project) taken
2007 May 17
0
Passing single precision arrays to legacy code
System: Fedora Core 5 R: 2.2.1 and 2.4.1, complied from source gcc: 4.1.1 I'm trying to pass a single precision array to some legacy code. I ultimately got the code working by ignoring part of the help documentation. The code is actually in Fortran, but the following C program illustrates the problem: $ cat foo.c #include <stdio.h> void foo(float *t) { int *bar;
2008 Jan 31
0
[LLVMdev] C embedded extensions and LLVM
Alireza, I have added full support for embedded C address spaces to the LLVM IR (see http://llvm.org/docs/LangRef.html#t_pointer). I have not added any support for the fractional types and their operators, though I think this would simply require adding the necessary intrinsics, which is one of the easier things to add to LLVM. Given that LLVM takes the approach of modeling these kinds
2017 Dec 20
2
Question about : lprofValueProfNodes
Thank you So it does not seem to be relevant for what I’m trying to do. I’m doing something unconventional. The objective is to implement PGO and code coverage on a system that does not exit and does not have any file io, or any of stdc libraries that libclang-profile is using. (more like a kernel) So what I’m trying to do is instead of calling __llvm_profile_write_file () from the application,
2008 Apr 16
1
[LLVMdev] overlay attribute
Chris, The reasons for not wanting the code generator to modify alloca to global references are: (1) Variable name is not as easily available in the code generator. (2) I did not want to go behind the back of compiler and change the storage class of a variable in the middle of the way. I felt more comfortable to have the frontend generate the correct information to begin with. But it concerns
2020 Jun 02
2
LLD : __start_ and __end_ symbols for orphan sections
On 2020-06-02, Moshtaghi, Alireza wrote: >Sorry for the cryptic code but I had to modify stuff from original >In the following example see the difference when you comment or uncomment the line in the linker script: >============ test.c ============= : >struct orphan_dummy_anno_s { > void (*func)(void); >}; > >static void dummy_export_dbg_log_init_f (void) __attribute__
2020 Nov 16
2
lld error: output file too large <some large number>
My target requires that text section be at 0x0 so "-Ttext 0x0" is passed to the linker. When I link with gold, it goes through; but lld fails. Instead of always returning the same calculation, when I change the calculation to the following, it links: return first->offset + (os->addr > first->addr ? os->addr - first->addr :
2007 Oct 04
0
[LLVMdev] Lowering operations to 8-bit!
On Oct 3, 2007, at 3:21 PM, Alireza.Moshtaghi at microchip.com wrote: > Thank you Evan, > I added the return Type::Int8Ty to the switch statement to get it to > work. > I don't know if this can have other consequences, I haven't yet > verified > if the generated Legalized DAG is correct though. If this works, please submit a patch. Otherwise please submit a bug
2007 Oct 03
2
[LLVMdev] Lowering operations to 8-bit!
Thank you Evan, I added the return Type::Int8Ty to the switch statement to get it to work. I don't know if this can have other consequences, I haven't yet verified if the generated Legalized DAG is correct though. A. -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Evan Cheng Sent: Monday, October 01, 2007 3:23 PM To: