search for: somefunc

Displaying 20 results from an estimated 54 matches for "somefunc".

2011 Apr 06
2
Limiting dtrace depth
If I use a simple dtrace script such as this: fbt::somefunc:entry{self->trace=1;} fbt::somefunc:return{self->trace=0;} fbt:::entry{} fbt:::return{printf("%lx", arg1);} then it will descend to whatever depth is necessary If I want to limit it to say 3 functions deep, how can I do that? The quick answer I want to use is to do "self-&gt...
2001 Sep 28
3
evaluating the contents of a string
Hi, suppose I do: b <- matrix(1:9,3,3) bname <- "b" now dim(b) returns [1] 3 3 and dim(bname) returns NULL is there a function to pass bname to such that dim returns the dimensions of b? like dim(somefunc(bname)) returns [1] 3 3 does 'somefunc' exist? daver +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |David Richmond It works on a | + Dept. of Sociology complex scientific + |Saint Mary's College principle, known as...
2011 Nov 02
2
[LLVMdev] annotations preventing optimizations/cleanup?
...ugin to add simple Annotations to VarDecls and FieldDecls, and write this modified AST out to a file. I notice that when I use clang to compile this file I get different code then when I use the source directly. In both cases I'm compiling with -O4. Can anyone explain this? Thanks define i32 @somefunc(i32 (i32)* %ptr) nounwind uwtable { entry: %ptr.addr = alloca i32 (i32)*, align 8 store i32 (i32)* %ptr, i32 (i32)** %ptr.addr, align 8, !tbaa !0 %ptr.addr1 = bitcast i32 (i32)** %ptr.addr to i8* call void @llvm.var.annotation(i8* %ptr.addr1, i8* getelementptr inbounds ([11 x i8]* @.str, i6...
2008 Jun 10
7
Unraveling a FAR*
Hi all, Just looking over fole_s_connect() in win32ole.c and I noticed this bit: hr = CLSIDFromProgID(pBuf, &clsid); ... hr = GetActiveObject(&clsid, 0, &pUnknown); ... hr = pUnknown->lpVtbl->QueryInterface( pUnknown, &IID_IDispatch, (void **)&pDispatch ); Using win32-api, that would be something like: IID_IUnknown =
2016 Nov 07
2
[llvm] To link or not to link
Hi, I have migrated an LLVM front-end from LLVM 3.5 to 3.8 and now to 3.9 and ORC, and there is a concept which I could not transfer. Consider: extern "C" { void somefunc() {} } … auto llvmfunc = llvm::Function::Create(type, llvmFunction::PrivateLinkage, "bla", module)); executionengine.addGlobalMapping(llvmfunc, &somefunc); // now I have llvmfunc to work with and don't need to consider anything else The GlobalMappingLayer class seems to provide t...
2011 Nov 02
0
[LLVMdev] annotations preventing optimizations/cleanup?
...use clang to compile this file I get different code then when I > use the source directly. In both cases I'm compiling with -O4. Can > anyone explain this? This is how clang implements annotations on local variables, that's all. Ciao, Duncan. > > Thanks > > define i32 @somefunc(i32 (i32)* %ptr) nounwind uwtable { > entry: > %ptr.addr = alloca i32 (i32)*, align 8 > store i32 (i32)* %ptr, i32 (i32)** %ptr.addr, align 8, !tbaa !0 > %ptr.addr1 = bitcast i32 (i32)** %ptr.addr to i8* > call void @llvm.var.annotation(i8* %ptr.addr1, i8* getelementptr &...
2004 Nov 04
5
Conversion of strings to expressions
...d like to be able to "reference" the vector by using the string containing the name of the vector - that is, I would like to know of some function which is able to convert the string "vec" into the vector vec itself. The purpose of this is to be able to do something like >somefunc("vec")==2 [1] FALSE TRUE FALSE TRUE I hope it is clear from this what the problem is. It seems to me that the function desired is akin to a sort of "inverse" to the quote() function, but I have been unable to find such a function. I am using R 1.9.1 on Windows 2000 SP4. Does...
2012 Oct 03
1
[LLVMdev] [PROPOSAL] Adding support for -fstack-protector-strong
...gered for a lot of C++ function s that > allocates an object on the stack and call methods on them. Is it possible > to tighten up the heuristic slightly so that this isn't the case? I don't see any inherent difference (for this purpose) between void foo() { int x; someFunc(&x); } and void foo() { SomeClass x; x.someNonStaticMethod(); } It's just that C++ is so good at obscuring the details. Granted there is no & operator in the second case, but the address of the stack-local object is available to the called method without any hi...
2007 Nov 13
1
win32-api idea - wide method first based on $KCODE
...brary, TEXT(RSTRING(v_ascii)->ptr)); if(!fProc){ VALUE v_unicode = rb_str_new3(v_proc); v_unicode = rb_str_cat(v_unicode, "W", 1); fProc = GetProcAddress(hLibrary, TEXT(RSTRING(v_unicode)->ptr)); ... So, for example, when you do this: Win32::API.new(''SomeFunc'',...) It looks for SomeFunc. If that fails it looks for SomeFuncA (which is what most of the functions actually default to). If that fails it looks for SomeFuncW. If that fails, then an error is raised. What about switching the order so that it looks for SomeFuncW -first- and SomeFuncA -...
2017 Jun 16
3
'ordered' destroyed to 'factor'
...)[[1]]? # no longer ordered sapply(o, min)[[1]]??????????# no longer ordered Jens?Oehlschl?gel ? ? P.S: The above examples are silly for simple reproduction. The current behavior broke my use-case which had a structure like this ? # have some data x <- 1:20 # apply some function to each element somefunc <- function(x){ ? # do something and return an ordinal level ? sample(o, 1) } x <- sapply(x, somefunc) # get minimum result min(x) # Error in Summary.factor(c(2L, 26L), na.rm = FALSE) : #?? ?min? not meaningful for factors ? ? > version ?????????????? _????????????????????????? ? platform?...
2010 Mar 19
2
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
...Changing the code to: float (*theF)(float) = (float (*)(float)) EE -> getPointerToFunction(f); float retVal = theF(arg1); made the difference. Now it is dozens of times faster! I don't really understand the cause though.. Why doesn't ExecutionEngine cope well with "define float @someFunc(float %x)" and needs this trick ? (but copes well with "define i32 @someFunc(i32 %x) ) The function was generated using "getOrInsertFunction(name, Type::getFloatTy(ctx), Type::getFloatTy(ctx), (Type*)NULL); And the orginal slow execution was: std::vector<GenericValue> args(...
2009 Apr 24
2
passing a value to a js function via button_to_function
I''ve got a table of what I call resources, want to show in a jQuery dialog a particular record when user clicks button in a row. in the table I''m doing: <td><%=button_to_function ''Show'',''showresource1()'',:class =>"ui-button ui-state-default ui-corner-all", :id => resource.id %></td> js: <script
2005 May 30
3
Vector Manipulation
Dear All, For any given vector, I want to extract a sub-vector such that the new vector skips all zeros, if any , at the start of vector. Is it possible to achieve this w/o looping? E.G : > x = c(0,0,1,2,3,4,5,0,0,8,9) > y = somefunc(x); > y [1] 1 2 3 4 5 0 0 8 9 In the example above, I want to skip the two leading zeroes till I hit the non-zero (1 in the above case). I also want to retain all zero after the first non-zero digit (again 1 in this case). Hope I am not confusing you...
2020 Mar 12
2
support of `substitute(...())`
Dear R Core Team, I learnt approx. two years ago in this mailing list that one can use the following "trick" to get a (dotted pair)list of the ellipsis arguments inside a function: `substitute(...())` Now my problem is that I can not find any occurrence of this call within the R source - the most frequent solution there is `substitute(list(...))[-1L] ` I would like to know if: 1)
2011 Jan 21
4
[LLVMdev] How to extend llvm IR and frontend?
...stem with multiple address spaces such that each address space is accessed using different instructions. Now suppose, I wanted to add a new keywords 'foo' and 'bar' to the front of c variables and function return types such that the following would be valid: foo void* a; foo void* somefunc(){...} bar int b; int somefunc2(bar int*){...} Furthermore, if I wanted this keyword to be added as part of the LLVM IR in some manner such that the during the translation of LLVM IR to some target machine ASM it could be used to switch which address spaces are used (e.g. if I specify one of the k...
2018 Sep 11
2
linear-scan RA
...construct an example where we don't I'd love to hear about it. > > If you wonder about the liveness information, you can perform experiments like this (I'm using a NOOP instruction with an implicit use operand to produce some artificial uses). > > $ cat test.mir > name: somefunc > body: | > bb.0: > %0:gr32 = MOV32ri 42 > JB_1 %bb.2, undef implicit $eflags > JMP_1 %bb.2 > > bb.1: > %1:gr32 = MOV32ri 17 > JMP_1 %bb.3 > > bb.2: > NOOP implicit %0 > %1 = COPY %0 > JMP_1 %bb.3 > > bb.3: &...
2007 Jun 28
5
Droppable onHover fires on page load, not on hover
Hi all, first post. I have a simple set of drag/drops that I''m trying to use in FF. Unfortunately on page load all of the droppables on the page fire simultaneously and then won''t respond to any futher attempts to drop anything on them. Firebug isn''t showing any errors and I''m completely stumped... Any ideas of where to look? using:
2005 Oct 28
3
[LLVMdev] "Bound Methods" in LLVM Bytecode
.... Specifically, I'm working on a toy implementation of a tiny piece of Python using LLVM as a native code generating JIT. I've run into a bit of an issue, involving how Python deals with method calls. I'm not sure how/if I can implement this in LLVM. In Python, the following code: somefunc = a.method somefunc() Roughly translates into: functionObject = lookup( "method" in object a ) functionObject->functionPointer() The challenge is that if "method" is actually a method, calling it magically adds "a" as the first parameter. If it is NOT a method,...
2017 Nov 03
2
FW: clarification needed for the constrained fp implementation.
...f is undefined behavior. The C99 standard provides library calls to access the environment (fesetround, fegetround, fetestexcept, etc.) but you can only safely use these if you have set FENV_ACCESS to the "on" state. A typical usage might look like this: #include <fenv.h> double someFunc(double A, double B, bool ForceRoundUp) { #pragma STDC FENV_ACCESS ON double Result; if (ForceRoundUp) { int OldRM = fegetround(); fesetround(FE_UPWARD); Result = A/B; fesetround(OldRM); } else { Result = A/B; } return Result; } So you see here that there are explici...
2018 Sep 11
2
linear-scan RA
...'t I'd love to hear about it. > > > > If you wonder about the liveness information, you can perform > experiments like this (I'm using a NOOP instruction with an implicit use > operand to produce some artificial uses). > > > > $ cat test.mir > > name: somefunc > > body: | > > bb.0: > > %0:gr32 = MOV32ri 42 > > JB_1 %bb.2, undef implicit $eflags > > JMP_1 %bb.2 > > > > bb.1: > > %1:gr32 = MOV32ri 17 > > JMP_1 %bb.3 > > > > bb.2: > > NOOP implicit %0 >...