search for: mytyp

Displaying 20 results from an estimated 47 matches for "mytyp".

Did you mean: mytype
2012 Dec 30
2
[LLVMdev] Cannot interchange "literal" and "identified" structs
With primitive types, I can interchange literal usage and type aliases in IR: %mytype = type i32 define void @foo(%mytype* %ptr) { %t1 = load *%mytype** %ptr store i32 *%t1*, *i32** %ptr ret void } But for structs, I cannot: %mytype = type { i32, i32 } define void @foo(%mytype* %ptr) { %t1 = load *%mytype** %ptr store* { i32, i32 }* %t1, *{ i32, i32 }** %ptr ret voi...
2012 Jun 13
2
[LLVMdev] Structs passed by value
...ypes. What I've found is that none of the options yield the expected results for the input code (see below). Except for the indirect case, the function signature is changed to take each structure element. How can I modify LLVM to pass structures by value? Thanks, Javier [Original Code] struct myType { long val; }; int convert(struct myType in) { return (int)in.val; } [Expected Result] define i32 @convert(%myType %in) nounwind readonly alwaysinline{ entry: %in.addr = alloca %myType, align 8 store %myType %in, %myType* %in.addr, align 8 %0 = getelementptr inbounds %myType* %in.addr,...
2012 Dec 30
0
[LLVMdev] Cannot interchange "literal" and "identified" structs
...eral types, aka unnamed StructType(s)." ? See also; http://blog.llvm.org/2011/11/llvm-30-type-system-rewrite.html ...Takumi 2012/12/30 Justin Holewinski <justin.holewinski at gmail.com>: > With primitive types, I can interchange literal usage and type aliases in > IR: > > %mytype = type i32 > > define void @foo(%mytype* %ptr) { > %t1 = load %mytype* %ptr > store i32 %t1, i32* %ptr > ret void > } > > But for structs, I cannot: > > %mytype = type { i32, i32 } > > define void @foo(%mytype* %ptr) { > %t1 = load %mytype* %ptr >...
2008 Dec 05
2
adding rows as arithmatic calculation on original rows
Dear R users, Suppose I have the following data.frame: myID myType myNum1 myNum2 myNum3 a Single 10 11 12 b Single 15 25 35 c Double 22 33 44 d Double 4 6 8 and I want to have new records: myID myType myNum1 myNum2 myNum3 e Single...
2009 Sep 15
1
Regular expression problem
Dear R-users, I am trying to use the grep function to test whether a particular string is of the form "n.../mydir/myfile.mytype.myext". Anything between n and mytype could vary, and anything after mytype could vary. I tried to proceed by steps to build my regular expression... but I do not really understand why the last call of the following code do not work. Any help would be greatly appreciated. mystr <- &qu...
2012 Jun 14
0
[LLVMdev] Structs passed by value
...ode (see below). Except for the indirect case, the function > signature is changed to take each structure element. How can I modify LLVM > to pass structures by value?**** > > ** ** > > Thanks,**** > > Javier**** > > ** ** > > [Original Code]**** > > struct myType {**** > > long val;**** > > };**** > > int convert(struct myType in)**** > > {**** > > return (int)in.val;**** > > }**** > > ** ** > > [Expected Result]**** > > define i32 @convert(%myType %in) nounwind readonly alwaysinline{**** > >...
2017 Jan 09
3
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...at playingwithpointers.com> wrote: >> +1 Exactly this. >> I don't think C programmer will not understand using. The "=" makes it much >> simpler to read, even if it is the first time you see it, which is not the >> case of typedef. >> >> typedef MyType::NestedType (*fptr)(const MyOhterType&); >> or >> using fptr = MyType::NestedType (*)(const MyOhterType&); > I would prefer to please keep using typedefs at least for function pointers. I find either of typedef MyType::NestedType (*fptr)(const MyOhterType&); or type...
2006 Jan 21
3
help... why can''t Iuse data from two tables in the same view
...exercises model includes " has_many :templates ". The problem comes when I try to make the Template model available in the view. First, in the view, I debug @mytemplate = --- - !ruby/object:Template attributes: text8: number4: "1" exercise_id: "1" mytype: f id: "1" (etc...) This is the correct information being passed to the view - note that the debug headers are identical except for the base class name! - but from here on I can only access this information in the view by using ''debug''. For instance: Trying to...
2007 Jul 24
3
How to require a defined type...
Hi all, I''m struggling with the following: I have a defined type wrapped in a class: class myclass { define mytype(bla) { file { "blabla": .... } exec { "blablabla": ... } } } And I access the defined type in my other class by doing this: class otherclass { include myclass myclass::mytype { "alb": ... } # and here I want to require my defined type:...
2017 Jan 10
2
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
.... >> >> I don't think C programmer will not understand using. The "=" makes it >> much >> >> simpler to read, even if it is the first time you see it, which is not >> the >> >> case of typedef. >> >> >> >> typedef MyType::NestedType (*fptr)(const MyOhterType&); >> >> or >> >> using fptr = MyType::NestedType (*)(const MyOhterType&); >> > >> >> I would prefer to please keep using typedefs at least for function >> pointers. I find either of >> >>...
2014 May 02
1
Questions on extending Rcpp wrap and as with templates
...n sun_positions; as last line doesn't. Am I doing something wrong here? I did do the declaration before including <Rcpp.h>. 2) How to make as work for own types in containers The other way around, one can return a std::vector<double> implicitly, but how do I return std::vector<MyType>? I tried to define template<> MyType as(SEXP); But that didn't help, e.g. I had to write my own template<> std::vector<MyType> as(SEXP); Thanks for help Florian [[alternative HTML version deleted]]
2015 Feb 09
2
[LLVMdev] Any mechanism available for link time inlineing?
...t introduce for the moment noise. Two main problems come from the idea above are sizeof() (for allocation, passing by value/reference) and offsets of data members. Let's ignore for the moment sizeof related problems and just look at offsets. At the moment if we have class A { private: MyType data; public: MyType &getData() {return data} void setData(MyType &in) {data = in;} }; The above setters/getters can be easily inlined by the compiler to avoid a function call for such a trivial case. /* inside A.h */ class white A { public: MyType &getData()...
2017 Jan 09
2
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
...is much better for these, but that can be a matter of taste). > > — > Mehdi > +1 Exactly this. I don't think C programmer will not understand using. The "=" makes it much simpler to read, even if it is the first time you see it, which is not the case of typedef. typedef MyType::NestedType (*fptr)(const MyOhterType&); or using fptr = MyType::NestedType (*)(const MyOhterType&); Typedefs with function pointers are used in couple of places in LLVM and I find it terible to read. So it is not about new-ness. Trust me, I would never use typedef if using was first :)...
2013 Jul 16
1
[LLVMdev] llvm field
Is there any API in LLVM that can represent the field in java. such as the instucion "iget vx, vy, field_id" -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130716/81e59a4a/attachment.html>
2012 Jan 10
3
I am looking to try to mixing sounrce and content in a file instance
Let''s start with this: class whatever ( $myType=''other'' ) { file { "some-config-file": ... content => $myType ? { ''this'' => template("whatever/this.erb"), ''that'' => template("whatever/that.erb"),...
2020 Jun 04
2
[cfe-dev] Clang/LLVM function ABI lowering (was: Re: [RFC] Refactor Clang: move frontend/driver/diagnostics code to LLVM)
On 4 Jun 2020, at 0:54, James Y Knight via llvm-dev wrote: > While MLIR may be one part of the solution, I think it's also the case > that > the function-ABI interface between Clang and LLVM is just wrong and > should > be fixed -- independently of whether Clang might use MLIR in the > future. > > I've mentioned this idea before, I think, but never got around to
2013 Feb 17
2
[LLVMdev] Emitting recursive types
...39;m wondering how, when using IRBuilder, one can can it to emit a recursive type definition? The code for TypeBuilder explicitly states that it doesn't handle recursive types... I'm after being able to emit, programmatically, stuff like the Named Types example in the Language Reference: %mytype = type { %mytype*, i32 } I'd welcome any advice! Yours, James Jackson. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130217/030988e7/attachment.html>
2011 Nov 11
2
[LLVMdev] Argument's types mismatch when creating CallInst.
Hello. I have an .bc, which defines @foo(%type* arg1, %type* arg2, %type* arg3). Firstly, i do this: runtimeModule = getLazyIRFileModule("runtime.bc", smd, llctx); then this: fooFunction = runtimeModule->getFunction("foo"); myType = runtimeModule->getTypeByName("type"); After that, i'm creating another module: myModule = new Module("My Module", llctx); and create some AllocaInsts with type %type: AllocaInst * retZval = new AllocaInst(myType, "arg1...
2012 Jul 09
1
Custom ruby modules/classes, standard namespacing, pluginsync, etc.
still pretty new to Ruby, please bare with me :) Say I have a module with a custom type, structured like so: [modules]/mymodule/manifests/init.pp [modules]/mymodule/lib/puppet/provider/mytype/foo.rb [modules]/mymodule/lib/puppet/type/mytype.rb In foo.rb, I''d like to call some custom ruby functions in a module and/ or class. These are generic functions that may be used in other modules, e.g. md5.rb with a collection of MD5 functions/methods. I was thinking a generic ''...
2010 May 05
1
[LLVMdev] Size of packed struct type <{<3 x i32>, i32}>
...or this type? I wrote a small example to illustrate: ; ModuleID = 'myexample.bc' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" target triple = "x86_64-pc-linux" %mytype = type <{<3 x i32>, i32}> define void @myexample(%mytype* %src, i64 %index, i32* %result) { entry: %vectoraddr = getelementptr %mytype* %src, i64 %index, i32 0 %vector = load <3 x i32>* %vectoraddr %tmp1 = extractelement <3 x i32> %vector, i32...