search for: elementsize

Displaying 20 results from an estimated 32 matches for "elementsize".

Did you mean: element_size
2007 Sep 04
0
[LLVMdev] [PATCH]: Add SparseBitmap implementation
...parse. > + SparseBitmapElement(unsigned Idx) { This misses an explicit keyword. > + if (Bitmap.Elements.empty()) > + { > + AtEnd = true; > + return; > + } Here and a few other places miss reformatting. > + template <int ElementSize> > + class SparseBitmap { Do you expect clients will often want custom ElementSize values? Otherwise, it seems like this template parameter should be given a default value, or even just removed from the API. > + bool AtEnd; > + > + SparseBitmap<ElementSize&gt...
2009 May 12
1
[LLVMdev] SparseBitVector compile warning
The warning is: R:\SDKs\llvm\trunk\include\llvm/ADT/SparseBitVector.h(58) : warning C4099: 'llvm::ilist_sentinel_traits<llvm::SparseBitVectorElement<ElementSize>>' : type name first seen using 'struct' now seen using 'class' R:\SDKs\llvm\trunk\include\llvm/ADT/SparseBitVector.h(275) : see reference to class template instantiation 'llvm::SparseBitVectorElement<ElementSize>' being compiled R:\SDKs\llvm\trunk\in...
2007 Sep 01
2
[LLVMdev] [PATCH]: Add SparseBitmap implementation
The attached patch adds a SparseBitmap implementation, which more or less works the same way as GCC's sparse bitmap. That is, we only store non-zero bits (broken up into elements of some bit size), and store the elements in a linked list. We keep track of the last accessed part of the linked list, so in-order tests/sets/resets are all constant time, rather than linear time. Set operations
2007 Sep 04
2
[LLVMdev] [PATCH]: Add SparseBitmap implementation
...ents.empty()) > > + { > > + AtEnd = true; > > + return; > > + } > > Here and a few other places miss reformatting. Fixed. Anyone have a better .emacs for the indentation than the one in tools? > > > + template <int ElementSize> > > + class SparseBitmap { > > Do you expect clients will often want custom ElementSize values? Otherwise, > it seems like this template parameter should be given a default value, or > even just removed from the API. So, actually, at least in GCC, we discovered that we could...
2007 Sep 04
0
[LLVMdev] [PATCH]: Add SparseBitmap implementation
On Tue, Sep 04, 2007 at 10:35:10AM -0400, Daniel Berlin wrote: > On 9/4/07, Dan Gohman <djg at cray.com> wrote: > > On Fri, Aug 31, 2007 at 08:10:33PM -0400, Daniel Berlin wrote: > > > + template <int ElementSize> > > > + class SparseBitmap { > > > > Do you expect clients will often want custom ElementSize values? Otherwise, > > it seems like this template parameter should be given a default value, or > > even just removed from the API. > > So, actually, at least...
2007 Sep 04
6
[LLVMdev] [PATCH]: Add SparseBitmap implementation
...9/4/07, Dan Gohman <djg at cray.com> wrote: > On Tue, Sep 04, 2007 at 10:35:10AM -0400, Daniel Berlin wrote: > > On 9/4/07, Dan Gohman <djg at cray.com> wrote: > > > On Fri, Aug 31, 2007 at 08:10:33PM -0400, Daniel Berlin wrote: > > > > + template <int ElementSize> > > > > + class SparseBitmap { > > > > > > Do you expect clients will often want custom ElementSize values? Otherwise, > > > it seems like this template parameter should be given a default value, or > > > even just removed from the API. > >...
2007 Sep 07
0
[LLVMdev] [PATCH]: Add SparseBitmap implementation
...SparseBitVector is an implementation of a bitvector that is sparse by only +/// storing the elements that have non-zero bits set. In order to make this +/// fast for the most common cases, SparseBitVector is implemented as a linked list Please wrap lines to fit in 80 columns. + template <int ElementSize = 128> + struct SparseBitVectorElement { + public: I'd suggest outdenting this. Indenting due to the namespace doesn't add any value. Also, I'd suggest making ElementSize 'unsigned' instead of int. + unsigned ElementIndex; // Index of Element in terms of where firs...
2012 Sep 04
2
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
...::ArrayTyID: case Type::VectorTyID: case Type::StructTyID: { - if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV) || - isa<ConstantStruct>(CPV)) { + if (isa<ConstantAggregateZero>(CPV)) + aggBuffer->addZeros(Bytes); + else + { int ElementSize = TD->getTypeAllocSize(CPV->getType()); bufferAggregateConstant(CPV, aggBuffer); if ( Bytes > ElementSize ) aggBuffer->addZeros(Bytes-ElementSize); } - else if (isa<ConstantAggregateZero>(CPV)) - aggBuffer->addZeros(Bytes); - else - l...
2012 Sep 06
0
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
...; case Type::StructTyID: { > - if (isa<ConstantArray>(CPV) || isa<ConstantVector>(CPV) || > - isa<ConstantStruct>(CPV)) { > + if (isa<ConstantAggregateZero>(CPV)) > + aggBuffer->addZeros(Bytes); > + else > + { > int ElementSize = TD->getTypeAllocSize(CPV->getType()); > bufferAggregateConstant(CPV, aggBuffer); > if ( Bytes > ElementSize ) > aggBuffer->addZeros(Bytes-ElementSize); > } > - else if (isa<ConstantAggregateZero>(CPV)) > - aggBuffer->a...
2007 Sep 07
1
[LLVMdev] [PATCH]: Add SparseBitmap implementation
...on of a bitvector that is sparse by only > +/// storing the elements that have non-zero bits set. In order to make this > +/// fast for the most common cases, SparseBitVector is implemented as a linked list > > Please wrap lines to fit in 80 columns. Done > > + template <int ElementSize = 128> > + struct SparseBitVectorElement { > + public: > > I'd suggest outdenting this. Indenting due to the namespace doesn't add > any value. Also, I'd suggest making ElementSize 'unsigned' instead of > int. Done > > + unsigned ElementIndex;...
2020 Jul 30
2
Normalize a SCEV Expression
...t *p; for (int64_t i = 0; i < ...; ++i) p[i+2]... And assuming that I'm on a 64-bit machine. What I would like to do is normalize it like that, basically this: {2,+,1} i.e. map it to the index. Now, I tried to get the underlying element size of the pointer, then getUDivExpr(OriginalSCEV, ElementSize); But I don't get the desired SCEV back. Instead I'm getting: {16,+,8} \u 8, i.e. just adding udiv in the original expression. Why is this not simplified? Thanks, Stefanos Baziotis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pi...
2011 Nov 19
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...ddr = Access.getBase(); > > - setBaseName(); > + if (Access.isAffine()) { > > - // Devide the access function by the size of the elements in the array. > - // > - // A stride one array access in C expressed as A[i] is expressed in LLVM-IR > - // as something like A[i * elementsize]. This hides the fact that two > - // subsequent values of 'i' index two values that are stored next to each > - // other in memory. By this devision we make this characteristic obvious > - // again. > - isl_int v; > - isl_int_init(v); > - isl_int_set_si(v, Access.ge...
2012 Jul 30
0
[LLVMdev] IR optimization pass ideas for backend porting before ISel
...; } } Part of assemble codes (bubbleSort-gcc-O2.s) from GCC M*Core backend with -O2: .L3: cmplti r3,1 jbt .L6 mov r7,r2 movi r6,0 .L5: ldw r5,(r7) ldw r4,(r7,4) ... .L4: addi r6,1 addi r7,4 cmpne r3,r6 jbt .L5 The address calculating formula for such code is N(0) = arr; N(n) = N(n-1) + ElementSize, n>= 1 which r2 stands for arr, r7 stands for the next address, and ElementSize of int type is 4. However, LLVM GEP adopts a rule as N(n) = arr + n * ElementSize, and may produce several instructions to compute the address. Here's IR codes (bubbleSort-O3.ll) generated by Clang -O3: for...
2012 Sep 04
0
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
NVCC successfully handles the same IR, if we try to process the same .cu file with clang+nvptx and nvcc: CLANG/NVPTX: ============= $ cat dayofweek.cu __attribute__((device)) char yweek[7][4] = { "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN" }; $ clang -cc1 -emit-llvm -fcuda-is-device dayofweek.cu -o dayofweek.ll $ cat
2012 Sep 03
2
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
Dear all, Looks like the NVPTX backend cannot handle array-of-arrays contant (please see the reporocase below). Is it supposed to work? Any ideas how to get it working? Important for our target applications. Thanks, - Dima. $ cat test.ll ; ModuleID = '__kernelgen_main_module' target datalayout =
2005 Dec 15
1
Some handy methods - perhaps cool enough to be committed some time
...lse{ return new Geometry.Position(window.screenX,window.screenY); } } } document.getElementsWithInArea=function(tagname,area){ var elements=document.getElementsByTagName(tagname); var elementsWithin=new Array(); for(var i=0;i<elements.length;i++){ var elementsize=Element.getSize(elements[i]); var elementpos=Element.getPosition(elements[i]); var elementarea=new Geometry.Area(elementpos,elementsize); if( (elementarea.getLeft() >= area.getLeft() && elementarea.getLeft()<area.getRight()) || (elementarea.getRight() >= a...
2014 Mar 02
3
[LLVMdev] [RFC] The coding standard for "struct" should be relaxed or removed
On Mar 1, 2014, at 7:15 PM, Chandler Carruth <chandlerc at google.com> wrote: > On Sat, Mar 1, 2014 at 5:59 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > The current guidelines [1] on the use of the struct keyword are too > restrictive and apparently ignored. They limit the use of struct to > PODs, citing broken compilers. > > The guidelines are
2011 Nov 18
5
[LLVMdev] How to make Polly ignore some non-affine memory accesses
2011/11/15 Marcello Maggioni <hayarms at gmail.com>: > 2011/11/14 Tobias Grosser <tobias at grosser.es>: >> On 11/14/2011 02:45 PM, Marcello Maggioni wrote: >>> >>> 2011/11/14 Tobias Grosser<tobias at grosser.es>: >>>> >>>> On 11/14/2011 01:24 AM, Marcello Maggioni wrote: >>>>> >>>>> Hi Tobias.
2011 Nov 20
2
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...-  setBaseName(); >> +  if (Access.isAffine()) { >> >> -  // Devide the access function by the size of the elements in the array. >> -  // >> -  // A stride one array access in C expressed as A[i] is expressed in >> LLVM-IR >> -  // as something like A[i * elementsize]. This hides the fact that two >> -  // subsequent values of 'i' index two values that are stored next to >> each >> -  // other in memory. By this devision we make this characteristic >> obvious >> -  // again. >> -  isl_int v; >> -  isl_int_init(v...
2013 Oct 21
2
[LLVMdev] First attempt at recognizing pointer reduction
...uctions (we only support strides by one > currently). > I see. I'll have a look at IK_PtrInduction and see what patterns I can spot. Do you envisage a new IK type for strided induction, or just work with the PtrInduction to extend the concept of a non-unit stride (ie. separate Step from ElementSize)? cheers, --renato -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131021/4320c3b6/attachment.html>