similar to: Calling C++ code fom R --How to export C++ "unsigned" integer to R?

Displaying 20 results from an estimated 200 matches similar to: "Calling C++ code fom R --How to export C++ "unsigned" integer to R?"

2005 Apr 14
1
question about "R get vector from C"
Dear ALL-R helpers, I want to let R get vector from c ,for example :numeric array ,vector .I saw some exmple like this : /* useCall3.c */ /* Getting an integer vector from C using .Call */ #include <R.h> #include <Rdefines.h> SEXP setInt() { SEXP myint; int *p_myint; int len = 5; PROTECT(myint = NEW_INTEGER(len)); // Allocating
2008 Mar 19
1
Problem in using typedef with c++
Hi My code is as follows :- example.h #include"iostream.h" using namespace std; typedef int MYINT; void sum(MYINT a, MYINT b); example.cpp #include"example.h" void sum(MYINT a, MYINT b) { MYINT c; c=a +b; cout<<c; } example.i %module example %{ #include"example.h" extern void sum(MYINT a, MYINT b); %} #include "example.h"
2016 Dec 01
2
Placement new and TBAA
On Sat, Nov 26, 2016 at 12:07 AM, Sanjoy Das <sanjoy at playingwithpointers.com > wrote: > So if you: > > 1. override operator delete to do nothing for that type (so that the > placement new actually has unfreed backing storage to re-use). > 2. have an empty destructor. > So, void *operator new(decltype(sizeof 0), void *) noexcept; struct MyInt { static void
2012 Mar 22
2
Quicker way to apply values to a function
Hi all, myint=function(mu,sigma){ integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value } mymu=seq(-3,3,length(1000)) mysigma=seq(0,1,length(500))[-1] k=1 v=c() for (j in 1:length(mymu)) { for (i in 1:length(mysigma)) { v[k]=myint(mymu[j],mysigma[i]) k=k+1 } } Basically, I want to investigate for what values of mu and sigma, the integral is divergent. Is there another way
2012 Mar 23
1
Vectorize (scalar) function
Hi all, myint=function(mu,sigma){ integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value } x=seq(0,50,length=3000) x=x[-1] plot(x,myint(4,x)) # not working yet I think I have to 'Vectorize' it somehow? What's a scalar function? and a primitive function? Thanks. casper ----- ################################################### PhD candidate in Statistics School
2018 Mar 22
2
Broken relocation for generating offsets?
Hello, I append another clue I found out: The problem is definitely not caused by "__ImageBase" the problem comes with the "OFFSET". I generated another object file which crashed. The commonality: mov edx, DWORD PTR ?normalPlanschbecken@@3HA ; normalPlanschbecken lea rcx, OFFSET FLAT :??_C at _0CC@LCMJAIPO at Reading?5?$CCnormalPlanschbecken?$CC?5?$CFi@
2004 Jun 11
1
ROC for threshold value, biometrics
Hello, I am just a beginner of R 1.9.0. I try to construct a predictive score for the development of liver cancer in cirrhotic patients. So dependant variable is binanry (cancer yes or no). Independant variables are biological data. The aim is to find out a cut-off value which differentiate (theoratically) from normal to pathological state for each biological data. How can I step in procedue to
2018 Mar 22
0
Broken relocation for generating offsets?
I wouldn't be surprised if JITing COFF files on Windows doesn't work so well, since the object file format assumes most symbols are dllimport or within the local 2GB module address range. I'm not familiar with the current JIT state of the art, though. On Thu, Mar 22, 2018 at 1:45 AM via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Hello, > > I append another clue I
2009 Sep 12
0
[LLVMdev] [proposal] Extensible IR metadata
On Sep 11, 2009, at 3:23 PM, David Greene wrote: > I have a few questions and comments about Chris' initial proposal as > well. > > - I don't like the separation between "built-in" metadata and > "extended" > metadata. Why not make all metadata use the RegisterMDKind > interface and > just have the LLVM libraries do it automatically for
2009 Sep 11
4
[LLVMdev] [proposal] Extensible IR metadata
On Friday 11 September 2009 15:20, Jeffrey Yasskin wrote: > I've got a suggestion for a refinement: > > Right now, we have classes like DILocation that wrap an MDNode* to > provide more convenient access to it. It would be more convenient for > users if instead of > > MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag); > Inst2->setMD(MDKind::DbgTag, DbgInfo); >
2006 Jun 22
2
rails on Oracle 10g - missing controller ?
I am trying to generate my first scaffold but I am getting a 500 error from http://127.0.0.1:3000/foo . Below is the information about my system, as well as the commands I am typing. I have also included the DDL ( Oracle 10g ). I am mid way through chapter 6 of "Agile Web Development w/ Rails". Why aren''t there any files under app/controllers/ ? C:\tmp\rubyWork>ruby
2012 Apr 18
0
Numerical integration again
Hi all, Here is an integration function require(pracma) # for 'quadinf' myint=function(j) { quadinf(function(x) (1/(1+exp(-x)))^j*(1-1/(1+exp(-x)))^(k-j)*dnorm(x,mu,casigma),-Inf,Inf) } in any optimization routine. It works fine most of the time but failed with some particular sets of values, say one of the following: k=20 mu=-1.978295 casigma=0.008326927 >
2016 Nov 26
5
Placement new and TBAA
> On Nov 25, 2016, at 4:17 PM, Daniel Berlin via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > On Fri, Nov 25, 2016 at 6:10 AM, Hubert Tong <hubert.reinterpretcast at gmail.com <mailto:hubert.reinterpretcast at gmail.com>> wrote: > On Fri, Nov 25, 2016 at 1:42 AM, Daniel Berlin <dberlin at dberlin.org <mailto:dberlin at dberlin.org>> wrote:
2018 Mar 06
0
Broken relocation for generating offsets?
Hello LLVM-Mailing-List, I discovered a strange behavior when dealing with object files generated by the compiler of Visual Studio 2015. When jitting bc files I also add object files to look up functions. These object files are coming from visual studio. When using a switch case instruction that compiler often generates code based of __ImageBase. I show you a short snippet of the assembly
2009 Dec 07
2
[LLVMdev] a constant folding case causing different results w/ot optimization
Hi, The optimizer folds "(unsigned int) -1.0f" to 0. As a result, the following routine foo returns 0 with optimization, and returns -1 (0xffffffff) without optimization. unsigned int foo() { float myfloat = -1.0f; unsigned int myint = (unsigned int) myfloat; return myint; } INSTCOMBINE ITERATION #0 on IC: ConstFold to: i32 0 from: %conv = fptoui float
2013 Mar 20
0
[LLVMdev] Debug info for namespaces and "using"
I've noticed the work going on to support namespace and "using" directives. Awesome that this is happening, I've had a couple users wonder about it. (The main issue actually seems to be with anonymous namespaces; gdb will auto-import those declarations, but our debugger doesn't.) I thought I should also bring up another aspect of how Clang/LLVM handles namespaces, in case
2018 Dec 13
2
Crashes when adding VisualStduio generated object files to the JIT process
Hello everyone, I'm using the LLVM for a JIT-Client under Windows 64bit. I tried various stuff with it and noticed, that object files or libraries which are generated by the Visual Studio Compiler 2015 or 2017 will break the jitted code, when they are added to the process. I opened a bug for this a while ago (https://bugs.llvm.org/show_bug.cgi?id=39447) - sadly this bug will become a stopper
2005 Dec 29
5
Model Composition in Rails
I''m struggling understanding the model view of a combined model. Take the following: class P4 < ActiveRecord::Base has_many :p4_priorities end I figured out the naming and referencing of the sub models (i.e. P4.p4_priorities - seems simple enough but I had weird issues related to it). I''m all ok except that I am having issues with how to reference a
2004 Jun 16
0
Upgrading fom Fedora Core 1 to Centos - Reiserfs?
Hi, I want to 'upgrade' from fedora core 1 to centos 3.1, but all of my partitions are reiserfs. The anaconda installer does not give the option to use reiserfs in the disk partitioning portion, is there any way to change this? or should i use a different method to upgrade? Tim.
2009 Apr 29
1
Licence violation fom Microchip?
Dear dev team, I have following question: Microchip is offering IT'S speex library here: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023610for it's microcontrollers. Is this a derivate of your sources? If it is, then you should do some checking because I could not find any references to yor credits. Best regards, Marjan --------------