search for: myint

Displaying 20 results from an estimated 26 matches for "myint".

Did you mean: mint
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" extern void...
2006 May 08
1
Calling C++ code fom R --How to export C++ "unsigned" integer to R?
...Is there a way to export C++ "unsigned" integer to R? (I am trying to parse files in "BPMAP" format, and some variables are of type unsigned int (first declared in C++) ). I know that to export signed integer to R, I can do the following in C++: int Some_INTEGER = 5; int *p_myInt; SEXP myInt; PROTECT(myInt=NEW_INTEGER(1)); myInt[0] = Some_INTEGER; UNPROTECT(1); return myInt; However, it appears that myInt is a signed integer. I have looked over Rdefines.h and it does not look like there is a definition for NEW_UNSIGNED_INTEGER ! How would I export an unsigned inte...
2005 Apr 14
1
question about "R get vector from C"
...ear 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 storage space p_myint = INTEGER_POINTER(myint); p_myint[0] = 7; UNPROTECT(1); return myint; } then type at the command prompt: R CMD SHLIB useCall3.c to get useCall3.so In windows platform ,how can I...
2016 Dec 01
2
Placement new and TBAA
...ters.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 operator delete(void *) { } MyInt() { x = 0; } ~MyInt() { } int x; }; float *qq; void foo(void *p, void *q, long unk) { // unk = 1 for (long i = 0; i < unk; ++i) { auto pp = new (p) MyInt; delete pp; // or pp->~MyInt(); qq = new (static_cast<void *&gt...
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 invest...
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 ----- ##...
2018 Mar 22
2
Broken relocation for generating offsets?
...5. 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 output. mov eax, DWORD PTR ?myInt@@3HA ; myInt lea rdi, OFFSET FLAT:__ImageBase xor ebx, ebx Then these offset is used to jump to some labels like "$LL4 at execute:". When the object file gets added to the jitting process this offset generation seems to be broken. Executing the code coming from the...
2004 Jun 11
1
ROC for threshold value, biometrics
...pathological state for each biological data. How can I step in procedue to get a cut-off value (threshold) for each variable? I think I should try by ROC. But I'm not sure. If so, someone can lead me? If not, someone can advice me how ? Any advice will be cordially aprreciated. Tin Tin Htar Myint Research assistant Liver unit Jean Verdier Hospital, Bondy France
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 > sapply...
2018 Mar 22
0
Broken relocation for generating offsets?
...g 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 output. > mov eax, DWORD PTR ?myInt@@3HA ; myInt > lea rdi,* OFFSET FLAT*:__ImageBase > xor ebx, ebx > > > > Then these offset is used to jump to some labels like "$LL4 at execute:". > > When the object file gets added to the jitting process this offset > generation seems to be bro...
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:
2009 Sep 11
4
[LLVMdev] [proposal] Extensible IR metadata
...not make all metadata use the RegisterMDKind interface and just have the LLVM libraries do it automatically for the "built-in" stuff? Having a separate namespace of enums is going to get confusing. Practically every day I curse the fact that "int" is different than "MyInt" in C++. :-/ - Defaulting alignment to 1 when metatadata is not present is going to be a huge performance hit on many architectures. I hope we can find a better solution. I'm not sure what it is yet because we have to maintain safety. I just fear a Pass inadvertantly dropping met...
2009 Sep 12
0
[LLVMdev] [proposal] Extensible IR metadata
...gisterMDKind > interface and > just have the LLVM libraries do it automatically for the "built-in" > stuff? > Having a separate namespace of enums is going to get confusing. > Practically > every day I curse the fact that "int" is different than "MyInt" in C > ++. :-/ "builtin" metadata would also be registered, the only magic would be that the encoding would be smaller in the IR. > - Defaulting alignment to 1 when metatadata is not present is going > to be a > huge performance hit on many architectures. I hop...
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 -1.000000e+000 to i32 ; <i32> [#uses=1] While the result of "(unsigned int) -1.0f" is probably implementation defined, both gcc and Mi...
2013 Mar 20
0
[LLVMdev] Debug info for namespaces and "using"
...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 you hadn't noticed. If you have something like this: namespace MYSPACE { typedef int MYINT; }; // ... other stuff namespace MYSPACE { typedef long MYLONG; }; then Clang will emit two separate DW_TAG_namespace DIEs, one with a child MYINT and one with a child MYLONG. However, these namespace DIEs are not connected by DW_AT_extension, so a "using namespace MYSPACE;" that emits...
2018 Mar 06
0
Broken relocation for generating offsets?
...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 output. mov eax, DWORD PTR ?myInt@@3HA ; myInt lea rdi, OFFSET FLAT:__ImageBase xor ebx, ebx Then these offset is used to jump to some labels like "$LL4 at execute:". When the object file gets added to the jitting process this offset generation seems to be broken. Executing the code coming from the object fi...
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
2006 Jun 22
2
rails on Oracle 10g - missing controller ?
...exists test/unit/ exists test/fixtures/ create app/models/foo.rb create test/unit/foo_test.rb create test/fixtures/foos.yml The DDL is CREATE TABLE "foos"( "id" numeric(10) PRIMARY KEY, "myText" varchar(10), "myInt" int ) Dennis Byrne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060622/c11af5c5/attachment.html
2009 Aug 24
0
[LLVMdev] Regular Expression lib support
...stuff into everything from any stl container (or anything that supports insert or push_back for containers) or any generic struct/class (thanks to fusion), and it is simple to create new things to do just about anything you want. Even something as simple as parse(testStr.begin(),testStr.end(),int_,myInt); it executes faster then atoi. And of course, you cannot beat the license. Daniel just responded, so let me add based on his post. I know regex was slow, but if it is as slow as he is saying, that is even more incentive not to use it, not just based on how unusable it is on some platforms. If...
2009 Sep 11
0
[LLVMdev] [proposal] Extensible IR metadata
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); they could write: DILocation DbgInfo = Inst->getMD<DILocation>();