Acelerando ray tracing com OpenMP para WebAssembly
Resumo
É imperativo que o paralelismo não deixe de existir em jogos eletrônicos e ferramentas profissionais digitais que executam em navegadores de Internet. Para que um programa gráfico e interativo de ray tracing escrito em C execute na Web, o mesmo foi compilado para WebAssembly utilizando Emscripten, e utilizando código open source da Tencent, foi produzida uma versão paralelizada com OpenMP que também compila para a Web. Um experimento mostrou que, ainda que o OpenMP funcione na Web e seja observado alguma aceleração, esta esteve longe do limiar ideal. É necessário ajustes no programa e na metodologia para resultados mais significativos.
Palavras-chave:
Computação Móvel de Alto Desempenho Linguagens, Compiladores e Ferramentas para Alto Desempenho
Referências
CRATES.IO. 2025. rayon: Simple work-stealing parallelism for Rust [seção sobre dependentes]. [online]. Disponível em: [link]. Acesso em: 30 jan. 2025.
THE CLANG TEAM. 2025. OpenMP Support. [online]. Disponível em: [link]. Acesso em: 23 jan. 2025.
EMSCRIPTEN CONTRIBUTORS. 2015a. About Emscripten. [online]. Disponível em: [link]. Acesso em: 17 jan. 2025.
______. 2015b. Pthreads support. [online]. Disponível em: [link]. Acesso em: 17 jan. 2025.
FLUTTER. 2024. Web FAQ. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
GUIDE, The `wasm-bindgen`. 202-. Parallel Raytracing. [online]. Disponível em: [link]. Acesso em: 30 jan. 2025.
LINIETSKY, Juan; MANZUR, Ariel; GODOT COMMUNITY. 202-b. Exporting for the Web. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
______. 202-b. Using multiple threads. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
LIBGDX. 2025. HTML5 Backend and GWT Specifics. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
LLVM OPENMP. 2025. LLVM OpenMP* Runtime Library Interface. [online]. Disponível em: [link]. Acesso em: 24 jan. 2025.
NIHUI. Comentário na issue 13892 de FLATMAX (Flax, Matt) no projeto Emscripten. Enabling openmp. 8 mai. 2021. Github: @nihui. Disponível em: [link]. Acesso em: 17 jan. 2025.
RREVERSER (Ingvar Stepanyan). 2025. wasm-bindgen-rayon. [online]. Disponível em: [link]. Acesso em: 30 jan. 2025.
SDL. 2025. About SDL. [online]. Disponível em: [link]. Acesso em: 18 jan. 2025.
SHIRLEY, Peter; BLACK, Trevor David; HOLLASCH, Steve. Ray Tracing in One Weekend. Versão 4.0.1. [s.l.]: [s.e.], 2024. [online]. Disponível em: [link]. Acesso em: 18 jan. 2025.
UNITY TECHNOLOGIES. 2025. Technical limitations. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
THE CLANG TEAM. 2025. OpenMP Support. [online]. Disponível em: [link]. Acesso em: 23 jan. 2025.
EMSCRIPTEN CONTRIBUTORS. 2015a. About Emscripten. [online]. Disponível em: [link]. Acesso em: 17 jan. 2025.
______. 2015b. Pthreads support. [online]. Disponível em: [link]. Acesso em: 17 jan. 2025.
FLUTTER. 2024. Web FAQ. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
GUIDE, The `wasm-bindgen`. 202-. Parallel Raytracing. [online]. Disponível em: [link]. Acesso em: 30 jan. 2025.
LINIETSKY, Juan; MANZUR, Ariel; GODOT COMMUNITY. 202-b. Exporting for the Web. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
______. 202-b. Using multiple threads. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
LIBGDX. 2025. HTML5 Backend and GWT Specifics. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
LLVM OPENMP. 2025. LLVM OpenMP* Runtime Library Interface. [online]. Disponível em: [link]. Acesso em: 24 jan. 2025.
NIHUI. Comentário na issue 13892 de FLATMAX (Flax, Matt) no projeto Emscripten. Enabling openmp. 8 mai. 2021. Github: @nihui. Disponível em: [link]. Acesso em: 17 jan. 2025.
RREVERSER (Ingvar Stepanyan). 2025. wasm-bindgen-rayon. [online]. Disponível em: [link]. Acesso em: 30 jan. 2025.
SDL. 2025. About SDL. [online]. Disponível em: [link]. Acesso em: 18 jan. 2025.
SHIRLEY, Peter; BLACK, Trevor David; HOLLASCH, Steve. Ray Tracing in One Weekend. Versão 4.0.1. [s.l.]: [s.e.], 2024. [online]. Disponível em: [link]. Acesso em: 18 jan. 2025.
UNITY TECHNOLOGIES. 2025. Technical limitations. [online]. Disponível em: [link]. Acesso em: 29 jan. 2025.
Publicado
23/04/2025
Como Citar
SCHIRMER, Bento Borges; SILVA, Maria Clara Bohn; DIAS, Luis Henrique Siqueri; MONTEIRO, Thierry Weissheimer; CHARAO, Andrea Schwertner.
Acelerando ray tracing com OpenMP para WebAssembly. In: ESCOLA REGIONAL DE ALTO DESEMPENHO DA REGIÃO SUL (ERAD-RS), 25. , 2025, Foz do Iguaçu/PR.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2025
.
p. 1-4.
ISSN 2595-4164.
DOI: https://doi.org/10.5753/eradrs.2025.6557.
