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
! abstraction_penalty.F90 -- | |
! A Fortran version of the Stepanov Abstraction Penalty Benchmark | |
! | |
! The aim of this benchmark is to verify how efficiently | |
! compilers can deal with Fortran array semantics and data abstraction. | |
! | |
! The structure of the benchmark is quite simple. It adds 2000 | |
! doubles in an array 25000 times. Since arrays are first-class citizens | |
! in Fortran, it is expected that a compiler can simply create the | |
! an array descriptor without the creation of temporary array copies |
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
C BERECHNUNG EINER QUADRATWURZEL | |
1 READ(*,100) Z | |
100 FORMAT(F9.3) | |
WRITE(*,101) | |
101 FORMAT(6X,13HQUADRATWURZEL) | |
WRITE(*,102) | |
102 FORMAT(//6X,1HZ,11X,1HW) | |
2 WN=1.0 | |
3 WN1=0.5*(WN + Z/WN) | |
WRITE(*,300) WN1 |
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
CXX=icpx | |
CXXFLAGS=-Wall -g -O2 -march=native | |
.PHONY: all | |
all: example | |
example: example.cpp | |
$(CXX) -o $@ $(CXXFLAGS) -fsycl -fsycl-targets=spir64_x86_64 $< | |
.PHONY: clean |
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
#:block parallel_for(d=1,name="axpy") | |
#:contains args | |
a, x, y | |
#:contains range | |
n | |
#:contains params | |
real, value :: a | |
real, intent(in) :: x(n) | |
real, intent(inout) :: y(n) | |
integer :: i |
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 scipy as sp | |
import matplotlib.pyplot as plt | |
from math import sqrt | |
from scipy.integrate import solve_ivp | |
def l1kw(a,b): | |
"""Lobatto quadrature using 2 knots (trapezoid-like)""" |
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
from easyvvuq.actions import CreateRunDirectory, Encode, Decode | |
from easyvvuq.actions import CleanUp, ExecuteLocal, Actions | |
params = { | |
"max_time": {"type": "float", "default": 1.5 }, | |
"alpha": {"type": "float"}, | |
"outfile": {"type": "string", "default": "output.json"} | |
} |
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
#once | |
; LC3 Instruction Set Assembly for customasm (https://github.com/hlorenzi/customasm) | |
; | |
; References: | |
; Patt, Yale N.; Patel, Sanjay (2003). Introduction to Computing Systems: | |
; From Bits and Gates to C and Beyond. New York, NY: McGraw-Hill Higher | |
; Education. ISBN 0-07-246750-9. | |
#bankdef lc3_bank |
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
FC=gfortran | |
FCFLAGS=-Wall -O2 -fopenmp | |
.phony: all clean | |
all: abcd | |
abcd: abcd.F90 | |
$(FC) $(FCFLAGS) -o $@ $< |
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
#pragma once | |
#include <complex> | |
#include <vector> | |
#include <array> | |
#include <type_traits> | |
#include <span> // C++ 20 | |
#include <iostream> |
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
// compile with: | |
// icpx -fsycl csr_example.cpp | |
// | |
#include <algorithm> | |
#include <oneapi/mkl.hpp> | |
#include <CL/sycl.hpp> | |
int main(int argc, char const *argv[]) | |
{ |
NewerOlder