Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

** Note: ChatGPT Wrote This**

Certainly! Here is an updated version of the README.md file that describes the programs in more detail:

Data Filtering

This folder contains three programs that demonstrate data filtering using different approaches:

01: This program filters a large dataset using a simple loop in C++. It generates random input data, filters it by selecting only those values that are greater than the defined threshold (50), and prints the filtered data to the console.

02: This program is similar to cuda_data_filtering.cu, but it has been modified to avoid generating unnecessary zeros in the output. It uses an additional variable to store the number of filtered values, which is updated using atomic operations within the kernel. The kernel filters the data in the same way as the previous program, by selecting only those values that are greater than the defined threshold (50).

03: This program uses CUDA to filter a large dataset on the GPU. It generates random input data on the host (CPU), copies it to the device (GPU), launches a CUDA kernel to filter the data, and copies the filtered data back to the host. The kernel filters the data by selecting only those values that are greater than a defined threshold (in this case, 50).

To compile and run the CUDA programs, you will need a CUDA-capable GPU and the CUDA toolkit installed on your system. The C++ program can be compiled and run using a standard C++ compiler.

I hope these programs are helpful in demonstrating how data filtering can be performed using different approaches! Let me know if you have any questions.