Esempio n. 1
0
 def columns(self, a, identifier, size, charSize=0):
     if (a.dataType == Type.STRING):
         var1 = Variable(CType.STR_OFFS, identifier + "_offset", size)
         var2 = Variable(CType.CHAR, identifier + "_char", charSize)
         return [var1, var2]
     else:
         return Variable(self.codegen.langType(a.dataType), identifier,
                         size)
Esempio n. 2
0
 def inputColumns(self, a, identifier, size, charSize=0):
     if (a.dataType == Type.STRING):
         var1 = Variable(CType.SIZE, identifier + "_offset",
                         add(size, intConst(1)))
         var2 = Variable(CType.CHAR, identifier + "_char", charSize)
         return [var1, var2]
     else:
         return Variable(self.codegen.langType(a.dataType), identifier,
                         size)
Esempio n. 3
0
 def mapTemptableOutputAttribute(self, a, table, sizeEstimate):
     tempIdent = "itm_" + table["name"] + "_" + a.name
     itmCol = self.columns(a, tempIdent, sizeEstimate)
     if a.dataType == Type.STRING:
         itmCol = Variable(CType.STR_TYPE, tempIdent, sizeEstimate)
     self.codegen.gpumem.declareAllocate(itmCol)
     self.codegen.currentKernel.addVar(itmCol)
     self.itmFile[a.id] = itmCol
Esempio n. 4
0
 def variable(self, a, identifier, size=0):
     return Variable(self.codegen.langType(a.dataType), identifier, size)