ViniciusLawliet/Terrain-Generation-Benchmark ? reverse-engineered prompt

Reverse engineered prompt

Build me a small C project that generates procedural 3D terrain and compares a few ways of running it, one plain CPU version, one faster multicore version, and one GPU version with CUDA.

I want the terrain made from Perlin noise, then turned into a mesh with Marching Cubes, and I want the mesh exportable as an OBJ so I can open it in Blender or MeshLab. Please add a benchmark mode that runs each version several times and writes out timing and energy results, plus a simple summary with Energy Delay Product too. It should work on Linux and be buildable from the root with make.

If you need to check current docs for anything related to CUDA, OpenMP, RAPL, or NVML, go ahead and look them up online. Keep the project clean and practical, with shared code for the terrain and mesh parts, and separate code for the CPU, OpenMP, and CUDA implementations.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab