; ; Test gaussian instruction set. ; ; To run tests: ; ; $ ./build/ano tests/t_gaussian_set.ano > engine/dsl_ano.h ; $ make ; $ ./tests/01_run_tests.sh whatever_binary_make_produces gaussian ; ; @ANO_SCRIPT_NAME test_gaussian_inst ; @ANO_SCRIPT_VERSION 0.0.1 ; @ANO_SCRIPT_DESCRIPTION Test gaussian instruction set ; ; @ANO_FLAGS_VAR_NAME_SUBS [ ] ; @ANO_FLAGS_VAR_WARN_UNUSED [ ] ; ; Copyright (c) 2016-2024, Jani Salonen ; All rights reserved. ; mov t_color (# 0x11, 0x22, 0x33, 0x44) mov t_point (& 1.1, 2.2, 3.3) ; gdens ; mov a (0.0) mov b (1.0) call "t_gdens" ("gdens", a, b) mov a (t_color) call "t_gdens_color" ("gdens_color", a, b) mov a (t_point) call "t_gdens_point" ("gdens_point", a, b); ; gdist ; mov a (0.0) mov b (1.0) call "t_gdist" ("gdist", a, b) mov a (t_color) call "t_gdist_color" ("gdist_color", a, b) mov a (t_point) call "t_gdist_point" ("gdist_point", a, b); ; grand ; ; mov a (0.0) ; mov b (100.0) ; mov c (100.0) ; call "t_grand" ("grand", a, b, c) ; mov a (t_color) ; call "t_grand_color" ("grand_color", a, b, c) ; mov a (t_point) ; call "t_grand_point" ("grand_point", a, b, c); ; exit function t_gdens (_msg, _a, _b) { dump _msg gdens _a (_b) dump _a } function t_gdens_color (_msg, _a, _b) { dump _msg gdens _a.red (_b) dump _a.red gdens _a.green (_b) dump _a.green gdens _a.blue (_b) dump _a.blue gdens _a.alpha (_b) dump _a.alpha dump _a.brightness gdens _a (_b) dump _a } function t_gdens_point (_msg, _a, _b) { dump _msg gdens _a.x (_b) dump _a.x gdens _a.y (_b) dump _a.y gdens _a.z (_b) dump _a.z gdens _a.angle_xy (_b) dump _a.angle_xy gdens _a.mag_xy (_b) dump _a.mag_xy gdens _a.mag_xyz (_b) dump _a.mag_xyz gdens _a (_b) dump _a } function t_gdist (_msg, _a, _b) { dump _msg gdist _a (_b) dump _a } function t_gdist_color (_msg, _a, _b) { dump _msg gdist _a.red (_b) dump _a.red gdist _a.green (_b) dump _a.green gdist _a.blue (_b) dump _a.blue gdist _a.alpha (_b) dump _a.alpha dump _a.brightness gdist _a (_b) dump _a } function t_gdist_point (_msg, _a, _b) { dump _msg gdist _a.x (_b) dump _a.x gdist _a.y (_b) dump _a.y gdist _a.z (_b) dump _a.z gdist _a.angle_xy (_b) dump _a.angle_xy gdist _a.mag_xy (_b) dump _a.mag_xy gdist _a.mag_xyz (_b) dump _a.mag_xyz gdist _a (_b) dump _a } function t_grand (_msg, _a, _b, _c) { dump _msg grand _a (_b, _c) dump _a } function t_grand_color (_msg, _a, _b, _c) { dump _msg grand _a.red (_b, _c) dump _a.red grand _a.green (_b, _c) dump _a.green grand _a.blue (_b, _c) dump _a.blue grand _a.alpha (_b, _c) dump _a.alpha dump _a.brightness grand _a (_b, _c) dump _a } function t_grand_point (_msg, _a, _b, _c) { dump _msg grand _a.x (_b, _c) dump _a.x grand _a.y (_b, _c) dump _a.y grand _a.z (_b, _c) dump _a.z grand _a.angle_xy (_b, _c) dump _a.angle_xy grand _a.mag_xy (_b, _c) dump _a.mag_xy grand _a.mag_xyz (_b, _c) dump _a.mag_xyz grand _a (_b, _c) dump _a }