Displaying 18 results from an estimated 18 matches for "my_struct".
Did you mean:
mm_struct
2015 Mar 17
2
[LLVMdev] Alias analysis issue with structs on PPC
...address the underlying issue:
>
> If I take your example and modify it so that we have:
>
> struct box {
> double* source;
> double* source2;
> };
>
> then the parameter is passed as:
>
> define void @test(double* noalias nocapture %result, [2 x i64] %
> my_struct.coerce, i32 signext %len) #0
>
> and is extracted the same way:
>
> %my_struct.coerce.fca.0.extract = extractvalue [2 x i64] %
> my_struct.coerce, 0
> %0 = inttoptr i64 %my_struct.coerce.fca.0.extract to double*
>
> but, it is also important to realize that the i64 here...
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
they do not alias.
Compiling for x86, th...
2015 Mar 15
5
[LLVMdev] Alias analysis issue with structs on PPC
...rote:
>>>
>>>> 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) an...
2005 Apr 22
1
Beginner in R
hello ( and sorry for my poor english ... )
I'm a newbie on R software and I need to obtain this kind of system :
a structure, like a liste :
my_struct <- list()
my_struct$a <- a_value
my_struct$b <- another_value
my_struct$c <- one_more_value
and a function with two args : the first is a instance of the structure,
and the second is any component of the structure (here $a, $b or $c) and
the function will do some transformations on t...
2015 Mar 13
2
[LLVMdev] Alias analysis issue with structs on PPC
...ar 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 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...
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 * s_ptr )
16 {
17 printf ( "%p \n", s_ptr );
18 }
19
20 int
21 main ()
22 {
2...
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 keeps the 1-alignment
of the char array, which is not ok, as then the assignment (store) to...
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 long".
I read the...
2012 Oct 12
0
[LLVMdev] Target backend not converting char* to struct properly.
...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;
>
> When this occurs, LLVM seems to fold the struct and char* into one assembly
> 'object', which is perfectly fine. However, it also keeps the 1-alignment of
> the char array, which is not ok, as then th...
2012 Nov 28
0
[LLVMdev] Fwd: clang code-completion question
..., Nick!
Thank you for your reply.
Regarding to pointers to functions: look at this code:
static void _some_func(int a, int b, int c)
{
//-- do something
}
typedef void (*T_pMyFunc) (int a, int b, int c);
typedef struct {
T_pMyFunc p_my_func;
} T_MyStruct;
int main(void)
{
T_MyStruct my_struct = {
.p_my_func = _some_func,
};
_some_func/*cursor is here. I see function signature: int a, int b, int
c. Everything is great*/
my_struct./*cursor is here. I see only member T_pMyFunc p_my_func, but
there's no function signature. There would be even greater if clang could
hand...
2010 Jul 15
1
[LLVMdev] Figuring out the parameters of the Call Instruction
...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, !dbg !31
CallInst.getOperand(1).getNameStr(), return abc and type returns i64,
How do I figure the operand is a const expression and a cast operator
was used to generate it.
More generally, When I use Instruction iterator on BasicBlock, I get
the RHS of instruction
but n...
2012 Nov 23
2
[LLVMdev] clang code-completion question
...rs 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 structure initializers? I
mean, like that:
typedef struct {
int a;
int b;
} T_MyStruct;
int main(void)
{
T_MyStruct my_struct = {
.a = 0,
./*cursor is here. I want to get list of struct members: [a, b]*/
};
}
Thanks.
--
Regards,
Dmitry
[image: Встроенное изображение 1]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/2...
2012 Oct 12
1
[LLVMdev] Target backend not converting char* to struct properly.
...phen 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;
> >
> > When this occurs, LLVM seems to fold the struct and char* into one
> assembly
> > 'object', which is perfectly fine. However, it also keeps the
> 1-alignment of
> > the char...
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
...function.
Here is some more detail. The C struct is simple, but has mixed types:
struct STRUCT1 {
long type;
long nx;
double *x;
double a;
double b;
};
typedef struct STRUCT1 STRUCT1_TYPE;
The C function header is
void func1( long method, STRUCT1 my_struct, double *output);
I would like to have an R list mimicking the C struct,
and then use .C to call func1 with this information, e.g.
my.struct <- list(type=3,nx=5,x=1:5,a=2.5,b=8.3)
my.func1( 3, convert2raw( my.struct ), )
where R function convert2raw would return a vector of type raw...
2009 Jan 28
2
[PATCH] fs: Add new pre-allocation ioctls to vfs for compatibility with legacy xfs ioctls
Al, Could this be included in the vfs queue?
This patch adds ioctls to vfs for compatibility with legacy XFS
pre-allocation ioctls (XFS_IOC_*RESVP*). The implementation
effectively invokes sys_fallocate for the new ioctls.
Also handles the compat_ioctl case.
Note: These legacy ioctls are also implemented by OCFS2.
Signed-off-by: Ankit Jain <me at ankitjain.org>
Reviewed-by: Christoph
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame.
For instance
> ddTable <-
data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry"))
I want a dataset that is
Id Name
1 Paul
2 Bob
> unique(ddTable)
Will give me all 4 rows, and
> unique(ddTable$Id)
Will give me c(1,2), but not accompanied by the name column.