search for: numidx

Displaying 10 results from an estimated 10 matches for "numidx".

2008 Jul 23
0
[LLVMdev] GEP::getIndexValid() with other iterators
...or uint64_t. +// // A null type is returned if the indices are invalid for the specified // pointer type. // -const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, - Value* const *Idxs, - unsigned NumIdx) { +template <typename IndexTy> +static const Type* getIndexedTypeInternal(const Type *Ptr, + IndexTy const *Idxs, + unsigned NumIdx) { const PointerType *PTy = dyn_cast<PointerType>(Ptr); if (!PTy) return 0; // T...
2008 Jul 23
2
[LLVMdev] GEP::getIndexValid() with other iterators
On Jul 22, 2008, at 11:54 PM, Matthijs Kooijman wrote: > Hi Chris, > > >> I'd prefer to not turn this into a template. Why not just define a >> version that takes an array of uint64_t's or something like that? > because I want to be able to pass in iterators. I could define a > version that > takes std<uint64_t>::iterators, but next thing we know, we
2008 Jul 16
0
[LLVMdev] GEP::getIndexValid() with other iterators
...d parameters. -// -// A null type is returned if the indices are invalid for the specified -// pointer type. -// -const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, - Value* const *Idxs, - unsigned NumIdx) { - const PointerType *PTy = dyn_cast<PointerType>(Ptr); - if (!PTy) return 0; // Type isn't a pointer type! - const Type *Agg = PTy->getElementType(); - - // Handle the special case of the empty set index set... - if (NumIdx == 0) - return Agg; - - unsigned CurIdx = 1; -...
2008 Jul 16
3
[LLVMdev] GEP::getIndexValid() with other iterators
Hi all, currently, GetElementPtrInst has a method getIndexedType, which has a templated variant. You pass in a begin and an end iterator, and it will find the indexed type for those. However, both iterators must iterate over Value*. For some argpromotion code, I would like to pass in iterators that iterate over unsigneds instead of Value*. I currently solve this by transforming my
2011 Feb 04
3
[LLVMdev] ConstantBuilder proposal
...------------===// // Constant GEPs //===--------------------------------------------------------------------===// static Constant *GetGEP( Constant *C, ///< Pointer to item being indexed Constant *const *IdxList, ///< List of indices unsigned NumIdx) { ///< Number of indices return ConstantExpr::getGetElementPtr(C, IdxList, NumIdx); } template<typename RandomAccessIterator> static Constant *GetGEP( Constant *C, ///< Pointer to item being indexed RandomAccessIterator ArgBegi...
2010 Mar 11
2
How to add custom CDR fields to MySQL
Hi all, I've been trying to add a custom mysql field to my CDR's, but I must be doing something wrong. I am using asterisk 1.4 and asterisk 1.6, in extensions.conf I add: exten => h,1,Set(CDR(q931)=${HANGUPCAUSE}) This extension is executed, I can see it in the asterisk console. I have added a new column in my MySQL database called q931. However, the new field does not show up in
2005 Feb 02
1
[LLVMdev] RE: Question about Global Variable
...to construct all those IR instructions, for the first three, it is ok, as the following GetElementPtrInst *GEP = new GetElementPtrInst( pGVars, idxVec, "GetAryElement", InsertPos); Value *ldAddr = new LoadInst(GEP,"LdAryAddr",InsertPos); Value *ldAddr1 = new LoadInst(numidx, "idx_i", InsertPos); After this I need construct another getelementptr, and from the above IR code, the second getelementptr take the result of load as parameters. But there is no such prototype construction api for this case. The correct one should be as the following, GetElementPtr...
2007 Dec 17
0
[LLVMdev] Elsa and LLVM and LLVM submissions
I used &Idx[0]. In future, please avoid tabs in your patch. I applied your patch. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071217/056403.html - Devang On Dec 17, 2007, at 2:57 AM, Richard Pennington wrote: > Devang Patel wrote: >> On Dec 15, 2007, at 12:15 PM, Richard Pennington wrote: >>> I got the current version of LLVM via svn yesterday and
2007 Dec 17
2
[LLVMdev] Elsa and LLVM and LLVM submissions
Devang Patel wrote: > On Dec 15, 2007, at 12:15 PM, Richard Pennington wrote: > >> I got the current version of LLVM via svn yesterday and modified my >> code to >> use the LLVMFoldingBuilder. Very nice! >> >> My question is this: I noticed that the folding builder doesn't fold >> some >> operations, e.g. casts. Is there some reason why? If
2010 Oct 08
3
Efficiency Question - Nested lapply or nested for loop
My data looks like this: > data name G_hat_0_0 G_hat_1_0 G_hat_2_0 G_0 G_hat_0_1 G_hat_1_1 G_hat_2_1 G_1 1 rs0 0.488000 0.448625 0.063375 1 0.480875 0.454500 0.064625 1 2 rs1 0.002375 0.955375 0.042250 1 0.000000 0.062875 0.937125 2 3 rs2 0.050375 0.835875 0.113750 1 0.877250 0.115875 0.006875 0 4 rs3 0.000000 0.074750 0.925250 2 0.897750 0.102000