(1) Randomly initialize the set of endmembers from the dimensionality reduced
  hyperspectral data. Set , and ;
(2) Calculate the volume of the endmember set
        ;
(3) repeat
(4) Transmit the data set and the set of endmembers to the global memory of GPU;
(5) Calculation and Replacement: create threads ( is the number of pixels in data set),
  each thread test a pixel in all the endmember positions in the and recalculate the
  volume . Details of this step are listed below:
  (5.1) set ;
  (5.2) repeat
  (5.3) Create threads for all the pixels;
  (5.4) Each thread reads from the global memory of GPU to their own registers
    respectively, and replace in with the corresponding pixel vector of
    the thread (GPU Kernel);
  (5.5) Calculate the volume of the current endmember set , and store
     in the global memory (GPU Kernel);
  (5.6) copy the volumes of all threads to internal memory, and find out the largest
    volume ;
  (5.7) if , update , , and ;
  (5.8)  ;
  (5.9) until   ;
(6) until the endmember set converges and no new replacement takes place.
Algorithm 2: Fast endmember extraction based on N-FINDR on GPUs (NFINDR-GPU).