search for: element_typ

Displaying 20 results from an estimated 27 matches for "element_typ".

Did you mean: element_type
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
...d 1 class Belonging < ActiveRecord::Base 2 belongs_to :collector, 3 :class_name => "Collection", 4 :foreign_key => "collector_id" 5 belongs_to :element, :polymorphic => true 6 acts_as_list :scope => ''element_id=#{element_id} and element_type=#{quote_value element_type}'' 7 end The belongings database table structure: collector_id (integer) ; element_id (integer) ; element_type (string) ; position (integer) The self referential polymorphic aspect works like a charm! But the acts_as_list doesn''t! Here a demonstrati...
2006 Mar 24
1
Multiple table relationships
Hello, I''m just starting out with some Rails development and have the following table structure. I understand how to do a two table has many join but I actually need to relate a third table. Here is my structure: components id name updated_at elements id name updated_at element_types id name updated_at components_elements component_id element_id element_type_id updated_at My Component model has the following: class Component < ActiveRecord::Base has_and_belongs_to_many :elements end I haven''t actually added anything to my Element model but susp...
2015 Apr 09
2
[LLVMdev] BNF for IL/IR interpreter
...": "MHg4OjY0" } } } } } }, { "move": { "lvar": { "name": "mem64", "id": 58, "typ": { "mem": { "index_type": { "r64": true }, "element_type": { "r8": true } } } }, "rexp": { "store": { "memory": { "var": { "name": "mem64", "id": 58, "typ": { &quot...
2006 May 20
7
Polymorphic, many-to-many, self-referential data model
...#39;s some code: create_table :containers do |t| t.column :name, :string end create_table :chunks do |t| t.column :name, :string end create_table :ownerships do |t| t.column :name, :string t.column :container_id, :integer t.column :element_id, :integer t.column :element_type, :string end Then in the models: class Chunk < ActiveRecord::Base has_many :ownerships, :as => :element end class Ownership < ActiveRecord::Base belongs_to :element, :polymorphic => true # belongs_to :container end class Container < ActiveRecord::Base...
2009 Jun 06
5
Rake Tasks
...Scraper program. # His article is located at http://www.iterasi.net/openviewer.aspx?sqrlitid=wd5wiad-hkgk93aw8zidbw_ # require ''hpricot'' require ''open-uri'' # This class is used to parse and collect data out of an html element class Scraper attr_accessor :url, :element_type, :clsname, :childsearch, :doc, :numrows # Define what the url is, what element type and class name we want to parse and open the url. def initialize(url, element_type, clsname, childsearch) @url = url @element_type = element_type @clsname = clsname @childsearch = childsearch...
2018 Jan 23
2
RFC: Towards unified semantic for casts
...for each fancy_pointer<T> t: isa<G>(t) returns true iff current implementation of isa<G>(nonfancy_t) returns true where decltype(nonfancy_t) is T* - all old cast operations should return a raw pointer of type typename std::pointer_traits<fancy_pointer<T>>::element_type * and do not perform ownership transfer. - move_[dyn_]cast should do what unique_dyn_cast is currently doing in a more generic manner: it moves to an object of type typename std::pointer_traits<fancy_pointer<T>>::rebind<G> N.B. std::pointer_traits is a conception tha...
2010 Feb 18
6
[LLVMdev] ocaml survey
...ng removed for 2.7. I can keep the old functions around, but I'd prefer to keep the API clean. 3. Are there any llvm functionality that you need exposed to ocaml? Right now I plan to expose: add Union to TypeKind.t external union_type: llcontext -> lltype array -> lltype external union_element_types : lltype -> lltype array external build_indirect_br : llvalue -> int -> llbuilder -> llvalue external add_destination: llvalue -> llbasicblock -> unit external build_nsw_add : llvalue -> llvalue -> string -> llbuilder -> llvalue external build_nuw_add : llvalue -&g...
2019 Aug 29
2
enable_shared_from_this fails at runtime when inherited privately
...r hand, if you compile the code with additional -Dprefix=boost (and needed boost stuff installed, of course), it gives a compiler error ( gcc: 'boost::enable_shared_from_this<foo>' is an inaccessible base of 'foo'; clang: error: cannot cast 'boost::shared_ptr<foo>::element_type' (aka 'foo') to its private base class 'boost::enable_shared_from_this<foo>') I'm think, it would be helpful, if the std implemantions also would fail at compile time already, and wanted to ask if this would be possible/feasible. BR, Christian compilers: gcc-Ver...
2018 Jan 23
0
RFC: Towards unified semantic for casts
...ter<T> t: isa<G>(t) returns true iff current > implementation of isa<G>(nonfancy_t) returns true where > decltype(nonfancy_t) is T* > - all old cast operations should return a raw pointer of type typename > std::pointer_traits<fancy_pointer<T>>::element_type * and do not perform > ownership transfer. > - move_[dyn_]cast should do what unique_dyn_cast is currently doing in > a more generic manner: it moves to an object of type typename > std::pointer_traits<fancy_pointer<T>>::rebind<G> > > N.B. std::point...
2009 Jun 07
17
ActiveRecord Classes
I''m having a little trouble with understanding how to work out the schematic for some of my classes using ActiveRecord when a file is in my lib directory: Brief example: Here''s the outline of the files in use: ....app ........controllers ............application_controller.rb ............rushing_offenses_controller.rb ........models ............rushing_offense.rb ....lib
2011 Nov 10
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...rizer itself, and I'm planning on doing some >>> work on this in the future. >> Here you may also want to look into ScalarEvolution. Basically two loads >> access adjacent memory if the difference of the scalar evolution of the >> two load addresses is equal to sizeof(element_type). ScalarEvolution >> should be a lot more general than GetPointerBaseWithConstantOffset(). > > Thanks! That sounds great; I'll have to look at that. Talking about this I looked again into ScalarEvolution. To analyze a load, you would do: LoadInst *Load = ... Value *Pointer = Loa...
2011 Nov 08
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...thin the vectorizer itself, and I'm planning on doing some > > work on this in the future. > Here you may also want to look into ScalarEvolution. Basically two loads > access adjacent memory if the difference of the scalar evolution of the > two load addresses is equal to sizeof(element_type). ScalarEvolution > should be a lot more general than GetPointerBaseWithConstantOffset(). Thanks! That sounds great; I'll have to look at that. -Hal > > Cheers > Tobi -- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory
2010 Feb 18
0
[LLVMdev] ocaml survey
...any llvm functionality that you need exposed to ocaml? Nope. The only feature I'd like is exceptions on the OCaml side from LLVM errors. > Right now I plan to expose: > > add Union to TypeKind.t > external union_type: llcontext -> lltype array -> lltype > external union_element_types : lltype -> lltype array > > external build_indirect_br : llvalue -> int -> llbuilder -> llvalue > external add_destination: llvalue -> llbasicblock -> unit > > external build_nsw_add : llvalue -> llvalue -> string -> llbuilder -> > llvalue external...
2010 Nov 11
1
[LLVMdev] Bitcast to [0 x Type]*
Hi, I see many statements like the one following, with casts to a 0-sized array. %10 = getelementptr inbounds [0 x %struct.Link]* bitcast ([497 x %struct.Link]* @link_array to [0 x %struct.Link]*), i64 0, i64 %9 ; <%struct.Link*> [#uses=1] Why does this happen, and which transform causes this? Arushi -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 May 11
0
[LLVMdev] Python bindings available.
...l contains this fragment: (* RUN: grep -v {RecursiveTy.*RecursiveTy} < %t.ll *) let ty = opaque_type () in let th = handle_to_type ty in refine_type ty (pointer_type ty); let ty = type_of_handle th in insist (define_type_name "RecursiveTy" ty m); insist (ty == element_type ty) Which constructs %RecursiveType = type %RecursiveType*. >> Finally, just as the C++ STL has reverse_iterator, it did prove >> necessary to have a separate (At_begin parent | After element) type >> in order to walk the IR backwards. > > Well, it's possible to d...
2010 Feb 19
0
[LLVMdev] ocaml survey
...but > I'd prefer to keep the API clean. Knock yourself out. > 3. Are there any llvm functionality that you need exposed to ocaml? > Right now I plan to expose: > > add Union to TypeKind.t > external union_type: llcontext -> lltype array -> lltype > external union_element_types : lltype -> lltype array > > external build_indirect_br : llvalue -> int -> llbuilder -> llvalue > external add_destination: llvalue -> llbasicblock -> unit > > external build_nsw_add : llvalue -> llvalue -> string -> llbuilder -> llvalue > extern...
2017 Jan 16
4
[RFC 0/2] Propose a new pointer trait.
Hi, I'm part of an engineering team doing research on persistent memory support and we have stumbled upon an interesting problem. The issue is, we would like to be able to use the standard library containers in a persistent memory context (think NVDIMM-N). What I mean is that you allocate a container from said memory, use it like you normally would. After the application terminates, expectedly
2015 Oct 09
3
Python version for scripts in LLVM?
...t_function import argparse import itertools import random @@ -109,13 +110,13 @@ if args.verbose: # Print out the shuffle sequence in a compact form. - print >>sys.stderr, ('Testing shuffle sequence "%s" (v%d%s):' % - (args.seed, width, element_type)) + print ('Testing shuffle sequence "%s" (v%d%s):' % + (args.seed, width, element_type), file=sys.stderr) for i, shuffles in enumerate(shuffle_tree): - print >>sys.stderr, ' tree level %d:' % (i,) + print(' tree level %d:' % (i...
2011 Nov 08
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...be > improved within the vectorizer itself, and I'm planning on doing some > work on this in the future. Here you may also want to look into ScalarEvolution. Basically two loads access adjacent memory if the difference of the scalar evolution of the two load addresses is equal to sizeof(element_type). ScalarEvolution should be a lot more general than GetPointerBaseWithConstantOffset(). Cheers Tobi
2008 May 11
2
[LLVMdev] Python bindings available.
Hi Gordon, Thanks for your comments. > > Constant.string(value, dont_null_terminate) -- value is a string > > Constant.struct(consts, packed) -- a struct, consts is a list of > > other constants, packed is boolean > > I did this in Ocaml initially, but found the boolean constants pretty > confusing to read in code. I kept asking "What's that random true