similar to: Beginner in R

Displaying 20 results from an estimated 100 matches similar to: "Beginner in R"

2009 Jan 15
2
[LLVMdev] Testcase for OS kernel
Hi, The source attached at the bottom is a testcase which causes a back-end error in LLVM 2.4. These types of assembly routines are mainly used in OS kernels. I checked that GCC 4.3 works for this routine. The error messsage is ... Couldn't allocate output reg for constraint 'A'! I just need help or comments so that I could analyze and fix this bug. My
2009 Dec 11
1
The correct way to set an element in a list to NULL? (FAQ is not clear)
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-set-components-of-a-list-to-NULL_003f The explanation on this FAQ entry is not clear. It says '... similarly for named components...'. What I understood was x[i]<-list(NULL) is the same as x$a_name<-list(NULL). But, they are not. As the example below shows, x$a_name<-list(NULL) is the same as x[[i]]<-list(NULL). >
2007 Oct 20
1
Getting at what a named object represents in a function...
Hi, I'm pretty new to R. I have an object (say a list) and I I have a function that I call on various columns in that list (excuse terminology if it's wrong/ambiguous). Imagine its like this (actual values are unimportant) and called mylist: >mylist A B 1 5 2 5 3 6 4 8 5 0 I have a function: foo = function(param){ #modify list A or B values depending on
2015 Mar 17
2
[LLVMdev] Alias analysis issue with structs on PPC
Hal Finkel <hfinkel at anl.gov> wrote on 16.03.2015 17:56:20: > If you want to do it at a clang level, the right thing to do is to > fixup the ABI lowerings for pointers to keep them pointers in this case. > So this is an artifact of the way that we pass structures, and > constructing a general solution at the ABI level might be tricky. > I've cc'd Uli, who did most
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
Hi, I have the following C loop to vectorize: struct box { double* source; }; void test(double* restrict result, struct box my_struct, int len) { for (int i=0 ; i<len; i++) { result[i] = my_struct.source[i] * my_struct.source[i]; } } There are two references in the loop, result[i] (restrict) and my_struct.source[i] (readonly). The compiler should easily figure out that
2015 Mar 15
5
[LLVMdev] Alias analysis issue with structs on PPC
On Sun, Mar 15, 2015 at 4:34 PM Olivier Sallenave <ol.sall at gmail.com> wrote: > Hi Daniel, > > Thanks for your feedback. I would prefer not to write a new AA. Can't we > directly implement that traversal in BasicAA? > Can I ask why? Outside of the "well, it's another pass", i mean? BasicAA is stateless, so you can't cache, and you really don't
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
On Fri, Mar 13, 2015 at 2:54 PM Daniel Berlin <dberlin at dberlin.org> wrote: > On Fri, Mar 13, 2015 at 2:39 PM Olivier H Sallenave <ohsallen at us.ibm.com> > wrote: > >> Hi, >> >> I have the following C loop to vectorize: >> >> struct box { >> double* source; >> }; >> >> void test(double* restrict result, struct box
2010 Jul 14
2
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi, I am trying to figure out how to read arguments of a call instruction. I had few questions based on that I have the following C Code 1 #include <stdio.h> 2 3 struct my_struct 4 { 5 int a; 6 int b; 7 }; 8 9 struct my_struct abc; 10 void p_ptr ( unsigned long j) 11 { 12 printf ( "%lx \n", j ); 13 } 14 15 void struct_ptr ( struct my_struct *
2004 Aug 06
1
minor suggestions
> How did you do it without the pragma? I understood that the problem was a mismatch between the the declaration and definition in for some codebooks (exc_*_tables.c). > I saw you added the pragmas to disable the float/double warnings to misc.h > though that header isn't included by the files that generate the warnings. What are the offending files then? BTW, aside from the
2012 Oct 12
2
[LLVMdev] Target backend not converting char* to struct properly.
I'm having trouble getting my backend to properly treat the situation where a char* is converted into a struct, i.e. something like: char* pointer_representation = ...; MyStruct* my_struct = (MyStruct*) pointer_representation; my_struct->an_int_field = 5; When this occurs, LLVM seems to fold the struct and char* into one assembly 'object', which is perfectly fine. However, it also
2010 Jul 15
0
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi Shankha, > 24 p_ptr ((unsigned long)&abc); > call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64)) > nounwind, !dbg !31 > > Q.1 At line no 24 I try to read the address of global variable abc. > The address is type casted > from struct * to int * for which ptrtoint. I guess you mean "is type casted from struct * to unsigned
2012 Oct 12
0
[LLVMdev] Target backend not converting char* to struct properly.
On Fri, Oct 12, 2012 at 10:43 AM, Stephen McGruer <stephen.mcgruer at gmail.com> wrote: > I'm having trouble getting my backend to properly treat the situation where > a char* is converted into a struct, i.e. something like: > > char* pointer_representation = ...; > MyStruct* my_struct = (MyStruct*) pointer_representation; > my_struct->an_int_field = 5; > >
2012 Nov 28
0
[LLVMdev] Fwd: clang code-completion question
---------- Forwarded message ---------- From: Dmitry Frank <dimon.frank at gmail.com> Date: 2012/11/28 Subject: Re: [LLVMdev] clang code-completion question To: Nick Lewycky <nicholas at mxc.ca> Cc: "cfe-dev at cs.uiuc.edu Developers" <cfe-dev at cs.uiuc.edu> Hello, Nick! Thank you for your reply. Regarding to pointers to functions: look at this code: static void
2010 Jul 15
1
[LLVMdev] Figuring out the parameters of the Call Instruction
Hi Duncan, Thanks for pointing out my mistake. I will reword my questions. //C code int var1; //global int a, b; foo(a, b); bar(c); generates following //LLVM IR %1 = load a; %2 = load b; call foo(%1, %2) call bar(@var1) CallInst.getOperand(1).getNameStr() on foo, returns null, but on bar returns var1. Similarly, for call void @p_ptr(i64 ptrtoint (%struct.my_struct* @abc to i64)) nounwind,
2012 Nov 23
2
[LLVMdev] clang code-completion question
Dear developers, First of all, thank you for your job on clang, now I use clang as autocompletion tool with my Vim, and it seems to work awesome. But I have some questions: 1) Is it possible to make clang to complete pointers to functions as a functions? I mean, I want to get function prototype, with returning value type and all the parameters. 2) Is it possible to make completion work inside
2012 Oct 12
1
[LLVMdev] Target backend not converting char* to struct properly.
If you could point me towards the correct location in the standard I would appreciate that - I didn't realize it wasn't acceptable to turn pointer-data to structs. My example is reduced from the EEMBC benchmarks where I ran into the problem, so I may have reduced it too far by accident (but I'm fairly sure they do not use __attribute__ or similar). Adding a
2006 Aug 30
2
Continued:How can I seek in Ogg Vorbis file, but not using Vorbisfile library?
Hello, All. First, I want to thank Ian Malone and Ralph Giles, thanks for your kind replies. But I still have problems about seek. As you suggested, I could use ov_open_callbacks() to supply my own read/write/seek functions. So, can you give me an example? I?m sorry for my ignorance, because I haven?t used callbacks before. I analyzed the vorbisfile.c in Tremor, and I think I
2008 Jun 06
1
calling a C function with a struct
I am trying to call a precompiled C function that uses a struct as one of it's arguments. I could write a wrapper function in C, but I was hoping there is some way to pack fields into an array of type raw that could be passed directly to the function. Here is some more detail. The C struct is simple, but has mixed types: struct STRUCT1 { long type; long nx; double
2006 Dec 23
0
[794] trunk/wxruby2: Fix get_ruby_object so it works with SWIG tracking, move find_window_xx
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2007 Jul 05
0
act_as_tree, belongs_to and has_many foreign keys incorrect
Two models: class Project << ActiveRecord::Base has_many :files end class File << ActiveRecord::Base has_one :project acts_as_tree end Inside of the project model, when creating a new product, I want to store the hierarchy of files within it. If I do, my_top_level_file = my_project_object.files.create(:file_name => ''foo'');