This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module float32_add_4 | |
| ( | |
| input [31:0] args [3:0], | |
| output [31:0] res | |
| ); | |
| wire [31:0] add1_res, add2_res; | |
| float32_add adder1 (.lhs(args[0]), .rhs(args[1]), .res(add1_res)); | |
| float32_add adder2 (.lhs(args[2]), .rhs(args[3]), .res(add2_res)); | |
| float32_add adder3 (.lhs(add1_res), .rhs(add2_res), .res(res)); | |
| endmodule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module float32_splitter | |
| ( | |
| input [31:0] in, | |
| output sgn, | |
| output [8:0] exp, | |
| output [23:0] man | |
| ); | |
| assign sgn = in[31]; | |
| assign exp[8] = 0; | |
| assign exp[7:1] = in[30:24]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| struct String | |
| { | |
| const char* str; | |
| constexpr String(const char* str) : str { str } {} | |
| constexpr operator const char*() const | |
| { | |
| return str; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq.Expressions; | |
| public record Foo | |
| { | |
| public int Data { get; init; } | |
| public int Data2 { get; init; } | |
| public int Data3 { get; init; } | |
| public int Data4 { get; init; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <typeindex> | |
| template <typename T> | |
| class Function; | |
| template <typename T, typename... Args> | |
| class Function<T(Args...)> | |
| { | |
| private: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[wasm_bindgen] | |
| pub fn sleep(ms: i32) -> js_sys::Promise { | |
| js_sys::Promise::new(&mut |resolve, _| { | |
| web_sys::window() | |
| .unwrap() | |
| .set_timeout_with_callback_and_timeout_and_arguments_0(&resolve, ms) | |
| .unwrap(); | |
| }) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use rusty_v8 as v8; | |
| static MODULE_CODE_1: &'static str = r#" | |
| import { foo, bar } from "module_2"; | |
| let input = foo(3); | |
| bar(...input); | |
| console.log('foo'); | |
| "#; | |
| fn foo( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <coroutine> | |
| #include <iostream> | |
| #include <optional> | |
| size_t buffer[22]; | |
| struct my_generator | |
| { | |
| struct promise_type | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Copyright (c) 2020 Chanjung Kim. All rights reserved. | |
| .data | |
| text db "Hello, world!", 0 | |
| caption db "My title", 0 | |
| .code | |
| extern GetStdHandle: proc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| class Base | |
| { | |
| private: | |
| int _value; | |
| public: | |
| int GetValue() const | |
| { |