     }
     local_nh.insert(i_ref);
     return local_nh;
+  }
+*/
+
+  __global__ void
+  init_indices_krnl(unsigned int* d_clustering
+                  , unsigned int first_frame_above_threshold) {
+    unsigned int gid = blockIdx.x * blockDim.x + threadIdx.x;
+    if (gid < first_frame_above_threshold) {
+      d_clustering[gid] = gid;
+    }
   }
 
   std::vector<std::size_t>

  }


  __global__ void
  high_density_neighborhood_krnl(std::size_t offset
                               , float* d_coords_sorted

        }
      }
      // allocate memory and copy sorted coords to GPUs
      int i_gpu;
      #pragma omp parallel for\
        default(none)\
        private(i_gpu)\
        firstprivate(n_gpus,n_rows,n_cols,first_frame_above_threshold)\
        shared(d_coords_sorted,d_clustering,tmp_coords_sorted)\
        num_threads(n_gpus)
      for (i_gpu=0; i_gpu < n_gpus; ++i_gpu) {
        cudaSetDevice(i_gpu);
        cudaMalloc((void**) &d_coords_sorted[i_gpu]
                 , sizeof(float) * n_rows * n_cols);
        cudaMalloc((void**) &d_clustering[i_gpu]
                 , sizeof(unsigned int) * n_rows);
        cudaMemcpy(d_coords_sorted[i_gpu]
                 , tmp_coords_sorted.data()
                 , sizeof(float) * n_rows * n_cols
                 , cudaMemcpyHostToDevice);
        // initialize state traj with frame ids (up to threshold)
        cudaMemset(d_clustering[i_gpu]
                 , 0
                 , sizeof(unsigned int) * n_rows);
        init_indices_krnl
          <<< (n_rows / BSIZE_SCR) + 1
            , BSIZE_SCR >>>
          (d_clustering[i_gpu]
         , first_frame_above_threshold);
      }
    }

    //TODO: pairwise dist-comparison -> min-id to d_clustering

    //TODO: collect & merge d_clustering from GPUs
    //TODO: reduce clustering to min number of ids

    // cleanup CUDA environment
    for (int i_gpu=0; i_gpu < n_gpus; ++i_gpu) {
      cudaFree(d_coords_sorted[i_gpu]);
      cudaFree(d_clustering[i_gpu]);
    }
    return normalized_cluster_names(first_frame_above_threshold
                                  , clustering
                                  , fe_sorted);
