This file contains 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
/+dub.sdl: | |
dependency "mir-lapack" version="~>1.2.1" | |
dependency "mir-algorithm" version="~>3.5.0-alpha12" | |
+/ | |
import mir.ndslice.slice; | |
import mir.rc.array; | |
import mir.ndslice.allocation; | |
import std.traits: Unqual; | |
import mir.internal.utility: isComplex, realType; | |
import mir.ndslice.dynamic: transposed; |
This file contains 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
/+dub.sdl: | |
dependency "mir-random" path="./" | |
+/ | |
import mir.math.common; | |
import mir.ndslice.sorting; | |
import mir.random; | |
import mir.random.algorithm; | |
import mir.random.variable; | |
enum n = 30; // sample size |
This file contains 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
/+dub.sdl: | |
dependency "mir-random" path="./" | |
+/ | |
import std.algorithm; | |
import std.math; | |
import std.random; | |
import std.range : array, iota, take; | |
import std.stdio; | |
import mir.ndslice.sorting; | |
import mir.random.algorithm; |
This file contains 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 mir.ndslice.slice; | |
auto copySlow(CanonicalMatrix!ubyte f, CanonicalMatrix!ubyte t) | |
{ | |
assert(f.shape == t.shape); | |
foreach(i; 0..f.length!0) | |
foreach(j; 0..f.length!1) | |
t[i, j] = f[i, j]; | |
} |
This file contains 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
; ldc2 -linkonce-templates -betterC -O -release -mcpu=skylake -mattr=+avx512f -output-s gemm_micro_kernel.d | |
; export extern(C) | |
; auto dot_reg_basic_generic( | |
; const(__vector(float[16])[3][1])* a, | |
; const(float[1][8])* b, | |
; size_t length, | |
; ref __vector(float[16])[3][1][8] c, | |
; ) | |
; { | |
; return dot_reg_basic(a, b, length, c); |
This file contains 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
.section __TEXT,__text,regular,pure_instructions | |
.globl _dot_reg_basic_generic | |
.p2align 4, 0x90 | |
_dot_reg_basic_generic: | |
.cfi_startproc | |
vxorps %ymm14, %ymm14, %ymm14 | |
vxorps %ymm1, %ymm1, %ymm1 | |
vxorps %ymm9, %ymm9, %ymm9 | |
vxorps %ymm2, %ymm2, %ymm2 | |
vxorps %ymm7, %ymm7, %ymm7 |
This file contains 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
.section __TEXT,__text,regular,pure_instructions | |
.globl _dot_reg_basic_simple | |
.p2align 4, 0x90 | |
_dot_reg_basic_simple: | |
.cfi_startproc | |
vxorps %ymm0, %ymm0, %ymm0 | |
vxorps %ymm1, %ymm1, %ymm1 | |
vxorps %ymm2, %ymm2, %ymm2 | |
vxorps %ymm3, %ymm3, %ymm3 | |
vxorps %ymm4, %ymm4, %ymm4 |
This file contains 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
// ldc2 -linkonce-templates -betterC -O -release -mcpu=broadwell -output-s gemm_micro_kernel.d | |
import std.traits; | |
import std.meta; | |
import ldc.attributes; | |
import ldc.intrinsics; | |
version = GLAS_PREFETCH; | |
enum prefetchShift = 512; | |
@fastmath: |
This file contains 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
// ldc2 -linkonce-templates -betterC -O -release -mcpu=broadwell -output-s gemm_micro_kernel_simple.d | |
import ldc.attributes; | |
import ldc.intrinsics; | |
enum prefetchShift = 512; | |
@fastmath: | |
export extern(C) nothrow @nogc @fastmath | |
auto dot_reg_basic_simple( |
This file contains 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 = 'source/mir/glas/internal/gemm.d' | |
source_filename = "source/mir/glas/internal/gemm.d" | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-macosx" | |
%0 = type opaque | |
%1 = type opaque | |
%2 = type { i32, i32, i64, [2 x %object.ModuleInfo*], [23 x i8] } | |
%object.ModuleInfo = type { i32, i32 } | |
%ModuleReference = type { %ModuleReference*, %object.ModuleInfo* } |
NewerOlder