now programIndex returns laneIdx = %tid.x & (%warpsize-1) & programCount returns 32

This commit is contained in:
Evghenii
2013-11-14 19:27:52 +01:00
parent 8bb8f0eda4
commit 918ca339b6
3 changed files with 445 additions and 15 deletions

View File

@@ -1117,7 +1117,14 @@ DefineStdlib(SymbolTable *symbolTable, llvm::LLVMContext *ctx, llvm::Module *mod
}
// define the 'programCount' builtin variable
lDefineConstantInt("programCount", g->target->getVectorWidth(), module, symbolTable);
if (!g->target->isPTX())
{
lDefineConstantInt("programCount", g->target->getVectorWidth(), module, symbolTable);
}
else
{
lDefineConstantInt("programCount", 32, module, symbolTable);
}
// define the 'programIndex' builtin
lDefineProgramIndex(module, symbolTable);