4 Replies Latest reply on Dec 6, 2010 8:32 AM by Franchute13

    KERNELANALYZER problem

    Franchute13

      Hello.
      Sorry for my English.

      I'm running the following code at the KERNELANALYZER . When you press on the button "compile", closes the program without an ERROR message.

      Why is this happening?

       

       

      inline int mezclar(int *vector, int *vectorTemp, int posIzq, int posDer, int posFin) { int finIzq = posDer -1; int posAux = posIzq; int numElementos = posFin - posIzq +1; while (posIzq<= finIzq && posDer <= posFin){ if(vector[posIzq] < vector[posDer]) vectorTemp[posAux++] = vector [posIzq++]; else vectorTemp[posAux++] = vector[posDer++]; } while (posIzq<= finIzq){ vectorTemp[posAux++] = vector[posIzq++]; } while (posDer<=posFin){ vectorTemp[posAux++]=vector[posDer++]; } int i = get_global_id(0); //for (int i=0; i < numElementos; i++, posFin--){ //vector[posFin] = vectorTemp[posFin]; vector[i] = vectorTemp[i]; //} } inline mergeSort(int *vector, int *vectorTemp, int indexIzq, int indexDer) { if(indexIzq<indexDer){ int centro = (indexIzq+indexDer)/2; mergeSort(vector, vectorTemp,indexIzq,centro); mergeSort(vector, vectorTemp, centro+1,indexDer); mezclar(vector, vectorTemp, indexIzq, centro+1, indexDer); } } __kernel void main(__global int *vector,__global int *vectorTemp, int tamano, __global int *salida) { salida = mergeSort(*vector, *vectorTemp, 0, tamano); }