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
.text | |
.file "mandelbrot.7rcbfp3g-cgu.0" | |
.p2align 2 # -- Begin function _ZN10mandelbrot5start17h7d351b8658bbf2baE | |
.type _ZN10mandelbrot5start17h7d351b8658bbf2baE,@function | |
_ZN10mandelbrot5start17h7d351b8658bbf2baE: # @_ZN10mandelbrot5start17h7d351b8658bbf2baE | |
# %bb.0: # %start | |
store %sp, %sp, -5 | |
addi %sp, %sp, -5 | |
store %lr, %sp, 4 # 4-byte Folded Spill | |
li %r3, 0 |
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
; ModuleID = 'mandelbrot.7rcbfp3g-cgu.0' | |
source_filename = "mandelbrot.7rcbfp3g-cgu.0" | |
target datalayout = "e-m:e-p:32:32-i64:64-n32-S128" | |
target triple = "riscv32" | |
%"core::panic::PanicInfo" = type { [0 x i32], { {}*, [3 x i32]* }, [0 x i32], i32*, [0 x i32], %"core::panic::Location", [0 x i32] } | |
%"core::panic::Location" = type { [0 x i32], { [0 x i8]*, i32 }, [0 x i32], i32, [0 x i32], i32, [0 x i32] } | |
; mandelbrot::start | |
; Function Attrs: nounwind |
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
/* rustc mandelbrot.rs --emit=llvm-ir --target=riscv32imc-unknown-none-elf -C opt-level=3 */ | |
#![no_std] | |
#![feature(lang_items, start)] | |
use core::panic::PanicInfo; | |
extern "C" { | |
fn print_int(x: i32); | |
fn print_newline(); | |
} |
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
.text | |
.file "llvm-link" | |
.globl V66.V23.mul10 # -- Begin function V66.V23.mul10 | |
.p2align 2 | |
.type V66.V23.mul10,@function | |
V66.V23.mul10: # @V66.V23.mul10 | |
# %bb.0: # %entry | |
slawi %r4, %r3, 1 | |
slawi %r3, %r3, 3 | |
add %r3, %r3, %r4 |
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
" | |
let rec gcd m n = | |
if m = 0 then n else | |
if m <= n then gcd m (n - m) else | |
gcd n (m - n) in | |
() | |
" | |
.text | |
.file "gcd.ml.ll" | |
.globl V14.V6.gcd # -- Begin function V14.V6.gcd |
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
" | |
let rec dbl f = f +. f in | |
let rec yloop y = | |
if y >= 100 then () else | |
let rec xloop x y = | |
if x >= 100 then () else | |
let cr = dbl (float_of_int x) /. 100.0 -. 1.5 in | |
let ci = dbl (float_of_int y) /. 100.0 -. 1.0 in | |
let rec iloop i zr zi zr2 zi2 cr ci = | |
if i = 0 then print_int 1 else |
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
" | |
let rec fib n = if n <= 1 then n else | |
fib(n-1) + fib(n-2) in fib(3) | |
" | |
.text | |
.file "fib.ml.ll" | |
.globl V19.V9.fib # -- Begin function V19.V9.fib | |
.p2align 2 | |
.type V19.V9.fib,@function | |
V19.V9.fib: # @V19.V9.fib |
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 <ctype.h> | |
#include <memory.h> | |
#include <stdarg.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <unistd.h> | |
/* for SLD tata stream */ | |
typedef union { |
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
import re | |
coq2 = [ | |
'Maps.v', | |
'Imp.v', | |
'Preface.v', | |
'Equiv.v', | |
'Hoare.v', | |
'Hoare2.v', |
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
import numpy as np | |
import numpy.random as random | |
from numpy.testing import assert_allclose | |
from keras.models import Sequential, Model | |
from keras.layers import Input, Dense, Flatten, Concatenate | |
from rl.agents.dqn import DQNAgent | |
from rl.memory import SequentialMemory | |
from rl.processors import MultiInputProcessor |