Added comments to the kernel functions and updated the cuda_filter kernel to use multiple threads