             ac=az;
             az+=azu;
         }
-        aminc=min(min(ax,ay),az);
+        aminc=fminf(fminf(ax,ay),az);
     }
     detector[idx]=sum*maxlength;
 }

        cudaGetDeviceProperties(&deviceProp, dev);
        if (dev>0){
            if (strcmp(devicenames,deviceProp.name)!=0){
                mexWarnMsgIdAndTxt("Ax:GPUselect","Detected one (or more) different GPUs.\n This code is not smart enough to separate the memory GPU wise if they have different computational times or memory limits.\n First GPU parameters used. If the code errors you might need to change the way GPU selection is performed. \n Siddon_projection.cu line 266.");
                break;
            }
        }

        cudaCheckErrors("cudaMalloc projections fail");
    }
    
    
    
    for (unsigned int sp=0;sp<splits;sp++){
        
        // Create texture objects for all GPUs
