{"id":26155113,"url":"https://github.com/aengelke/mandel-qpu","last_synced_at":"2025-04-14T07:36:04.909Z","repository":{"id":81092173,"uuid":"67884329","full_name":"aengelke/mandel-qpu","owner":"aengelke","description":"Mandelbrot computation for the Raspberry Pi GPU","archived":false,"fork":false,"pushed_at":"2017-05-14T14:38:07.000Z","size":18,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T21:11:23.002Z","etag":null,"topics":["mandelbrot","raspberry-pi","raspberry-pi-gpu","videocore-iv"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aengelke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-10T17:20:35.000Z","updated_at":"2022-05-18T11:51:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0385e0d-892b-44d6-b753-00d52af64791","html_url":"https://github.com/aengelke/mandel-qpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aengelke%2Fmandel-qpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aengelke%2Fmandel-qpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aengelke%2Fmandel-qpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aengelke%2Fmandel-qpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aengelke","download_url":"https://codeload.github.com/aengelke/mandel-qpu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248840197,"owners_count":21169944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mandelbrot","raspberry-pi","raspberry-pi-gpu","videocore-iv"],"created_at":"2025-03-11T08:49:27.223Z","updated_at":"2025-04-14T07:36:04.851Z","avatar_url":"https://github.com/aengelke.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mandelbrot on the Raspberry Pi GPU\n\nThis repository contains the code to compute the Mandelbrot set on the GPU of the Raspberry Pi. It employs the twelve Quad Processor Units (QPUs) for the computation and optionally writes the final result into a NetCDF file.\n\nThe code for the host processor (ARM) is mainly contained in the `qpu_mandel.c` file, which basically calls the QPU code for each twelve lines. The GPU code is in the file `gpu_code.qasm`, which can be compiled with the [vc4asm macro assembler](http://maazl.de/project/vc4asm/doc/). For convenience, the compiled code is provided in the `gpu_code.hex` file.\n\n### Compiling\nIf the NetCDF header files are installed, `make` should be sufficient. Depending on the distribution of the NetCDF package, it might be required to use `CC=mpicc` for the compilation. The GPU code can be compiled with `vc4asm -C gpu_code.hex gpu_code.qasm`. The code has been tested with the Raspberry Pi 2.\n\n### Running\nThe program must be run as root as direct access to physical memory is required.\n\n### Performance\nRunning times for a resolution of 1920 x 1080 in the range of `-2,2;-1.125,1.125` with 100,000 iterations and a maximum distance of 2 (implies that `maxValue` is 4). The Raspberry Pi is not overclocked, i.e. the ARM core is clocked at 900 MHz and the GPU at 250 MHz.\n\n| Method | Running Time |\n| ------ | ------------ |\n| ARM, single-core, scalar | 1046.365 seconds |\n| ARM NEON, single-core, 4-lane SIMD | 409.827 seconds |\n| ARM NEON, 4 cores (OpenMP, dynamic scheduling), 4-lane SIMD | 104.036 seconds |\n| VideoCore IV, 12 QPUs, 16-lane SIMD | 33.781 seconds |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faengelke%2Fmandel-qpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faengelke%2Fmandel-qpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faengelke%2Fmandel-qpu/lists"}