Can a device function see the indexing of threads inside the global function?

If I have the following global and device functionsl

device void levenshteinDistance(int indexA, char *str,int strStart,int strLength,char *patternRemoved,int patternRemovedStart,int patternRemovedLength,int *dXIndividual,int *dXFinal)
{

   int offsetStr = strStart;
   int offsetPattern = patternRemovedStart;
   if (indexA < indexA+patternRemovedLength) {
   for (int i = offsetStr; i <= strLength; i++) {
	if (i == 0)
	    dXIndividual[indexA * (strLength+1) + i] = 0;
                                                     
	else{
	    if (str[i-1] == patternRemoved[indexA+offsetPattern])
		dXIndividual[indexA * (strLength+1) + i] = i;
	    else if (str[i-1] != patternRemoved[indexA+offsetPattern])
		dXIndividual[indexA * (strLength+1) + i] = dXIndividual[indexA * (strLength+1) + i - 1];
	}
   }
       __syncthreads();
    }
    dXFinal[0] = dXIndividual[(strLength+1) * (patternRemovedLength)];

}

extern “C”
global void ComputationdXOnGPU(int numStr, char *str, int *strStartIndices, int *strIndividualLengths,int numPatternRemoved, char *patternRemoved, int *patternRemovedStartIndices,int *patternRemovedIndividualLengths, int *dXFinal)
{
int ix = blockIdx.x * blockDim.x + threadIdx.x;
if (ix<numStr)
{
for (int i=0; i<numPatternRemoved; i++)
{
int strStart = strStartIndices[ix];
int strLength = strIndividualLengths[ix];
int patternStart = patternRemovedStartIndices[i];
int patternRemovedLength = patternRemovedIndividualLengths[i];
int size = (strLength+1) * patternRemovedLength;
int dXIndividual [size];
int *result = &dXFinal[ix * numStrings1 + i];
levenshteinDistance(ix,str,strStart, strLength, patternRemoved, patternRemovedStart, patternRemovedLength, dXIndividual, dXFinal);
}
}
}

If ix =0 then it will pass 0 to the device function via indexA. I need to ask if device function see the incrementing of ix due to int ix = blockIdx.x * blockDim.x + threadIdx.x;

I say in the device function, if (indexA < indexA+patternRemovedLength)

will indexA be incremented?

I think you’re confused about how CUDA works. There is nothing in your code that increments either ix, or indexA. CUDA doesn’t increment any variables like that. Different threads will have different values of ix. That is all.