Skip to content

Instantly share code, notes, and snippets.

View certik's full-sized avatar

Ondřej Čertík certik

View GitHub Profile
program bench3
implicit none
integer :: c
c = 0
call g1(c)
call g2(c)
call g3(c)
call g4(c)
call g5(c)
call g6(c)
; ModuleID = 'LFortran'
source_filename = "LFortran"
%array = type { i32*, i32, [1 x %dimension_descriptor] }
%dimension_descriptor = type { i32, i32, i32, i32 }
%array.0 = type { float*, i32, [1 x %dimension_descriptor] }
%size_arg = type { %dimension_descriptor*, i32 }
%complex_8 = type { double, double }
%complex_4 = type { float, float }
$ python
Python 3.9.6 | packaged by conda-forge | (default, Jul 11 2021, 03:35:11)
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> scipy.__file__
'/Users/ondrej/repos/scipy/scipy/__init__.py'
>>> scipy.test()
============================= test session starts ==============================
platform darwin -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
This file has been truncated, but you can view the full file.
program bench3
implicit none
integer :: c
c = 0
call g1(c)
call g2(c)
call g3(c)
call g4(c)
call g5(c)
call g6(c)
(TranslationUnit [(Module MaxwellEddy [] [] [(Subroutine destroy_system [(sys)] [] [(Declaration [(sys "type" [] [(Attribute intent [(inout)] [])] ())]) (Declaration [(default "type" [] [] ())])] [(Print () []) (If (FuncCallOrArray allocated [g0] []) [(Print () [])] []) (If (FuncCallOrArray allocated [eps] []) [(Print () [])] []) (If (FuncCallOrArray allocated [mu] []) [(Print () [])] []) (If (FuncCallOrArray allocated [sigma] []) [(Print () [])] []) (If (FuncCallOrArray allocated [emask] []) [(Print () [])] []) (If (FuncCallOrArray allocated [mtr1] []) [(Print () [])] []) (If (FuncCallOrArray allocated [mtr2] []) [(Print () [])] []) (If (FuncCallOrArray allocated [mtr3] []) [(Print () [])] []) (If (FuncCallOrArray allocated [w0mask] []) [(Print () [])] []) (If (FuncCallOrArray allocated [w1mask] []) [(Print () [])] []) (SubroutineCall destroy_msr_matrix [a0]) (SubroutineCall destroy_msr_matrix [a1]) (SubroutineCall destroy [ehist]) (SubroutineCall destroy [bhist]) (= sys default)] []) (Subroutine set_initial
@certik
certik / README
Last active July 21, 2020 15:33
Haskell macOS
This contains the contents of https://get.haskellstack.org/stable/osx-x86_64.tar.gz
#include <memory>
#include <iostream>
class objectA {
public:
~objectA() {
std::cout << "A";
}
};
program exceptions
use iso_fortran_env, only: Out_of_memory
implicit none
integer :: s
block enable (Out_of_memory)
! Possible failure will be caught in the `handle` block
call mysum(5, s)
print *, s
end block
program exceptions
implicit none
integer :: s, stat
try
! Possible failure will be caught in the `catch default` block
call mysum(5, s)
catch default
error stop
end try
[ 0%] Built target intrinsics_gen
[ 90%] Built target LLVMEnzyme-8
[100%] Running enzyme regression tests
-- Testing: 139 tests, 8 threads --
PASS: Enzyme :: Enzyme/add.ll (1 of 139)
PASS: Enzyme :: Enzyme/addOneMem.ll (2 of 139)
PASS: Enzyme :: Enzyme/augmentconst.ll (3 of 139)
PASS: Enzyme :: Enzyme/badarg.ll (4 of 139)
PASS: Enzyme :: Enzyme/badcall.ll (5 of 139)
PASS: Enzyme :: Enzyme/badcall2.ll (6 of 139)