├── all_sm.h ├── Sources ├── CIPL │ ├── cipl.h │ └── module.modulemap ├── SwiftyMKL │ ├── ipp.swift │ ├── MathFunctions.swift.gyb │ ├── mkl.swift │ ├── Vector.swift │ ├── Vector-impl.swift.gyb │ ├── RandDistrib.swift.gyb │ ├── RandDistrib.swift │ └── Vector-impl.swift └── mkl-tool │ └── main.swift ├── custom ├── custom.sh ├── missing_list ├── makefile ├── sparseblas_list ├── cblas_list ├── list_ipp ├── cblas_example_list ├── vml_vsl_list ├── list_ipl └── vml_vsl_example_list ├── .gitignore ├── Package.swift ├── get_headers.py ├── Tests ├── LinuxMain.swift.gyb ├── LinuxMain.swift └── SwiftyMKLTests │ ├── SwiftyMKLTests.swift.gyb │ └── SwiftyMKLTests.swift ├── README.md ├── all_rngi.h ├── all_rng.h ├── Makefile ├── basic.swift ├── all_ipps.h ├── all_vml.h ├── all_cblas.h ├── funcs.py └── mkl_funcs.py /all_sm.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Sources/CIPL/cipl.h: -------------------------------------------------------------------------------- 1 | #include "mkl.h" 2 | #include "ipp.h" 3 | -------------------------------------------------------------------------------- /custom/custom.sh: -------------------------------------------------------------------------------- 1 | cat cblas_list missing_list vml_vsl_list list_ipp > list_ipl 2 | make 3 | 4 | -------------------------------------------------------------------------------- /Sources/CIPL/module.modulemap: -------------------------------------------------------------------------------- 1 | module CIPL { 2 | umbrella header "cipl.h" 3 | link "intel_pl" 4 | export * 5 | } 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.so 2 | *.dylib 3 | Darwin/ 4 | Darwin.tgz 5 | Linux/ 6 | Linux.tgz 7 | *.swp 8 | intel64/ 9 | __pycache__ 10 | .DS_Store 11 | /.build 12 | /Packages 13 | /*.xcodeproj 14 | Package.resolved 15 | 16 | -------------------------------------------------------------------------------- /Sources/SwiftyMKL/ipp.swift: -------------------------------------------------------------------------------- 1 | import CIPL 2 | 3 | public struct IPP { 4 | public static func setup() { if ippInit() != ippStsNoErr { print("ippInit failed") } } 5 | public static func getLibVersion()->IppLibraryVersion { return ippsGetLibVersion()!.pointee } 6 | } 7 | 8 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.2 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "SwiftyMKL", 7 | products: [ 8 | .library( name: "SwiftyMKL-Static", type: .static, targets: ["SwiftyMKL"]), 9 | ], 10 | dependencies: [ 11 | .package(url:"https://github.com/jph00/BaseMath.git", from: "1.0.0"), 12 | ], 13 | targets: [ 14 | .systemLibrary(name: "CIPL"), 15 | .target( name: "SwiftyMKL", dependencies: ["CIPL", "BaseMath"]), 16 | .target( name: "mkl-tool", dependencies: ["SwiftyMKL"]), 17 | .testTarget( name: "SwiftyMKLTests", dependencies: ["SwiftyMKL"]), 18 | ] 19 | ) 20 | 21 | -------------------------------------------------------------------------------- /get_headers.py: -------------------------------------------------------------------------------- 1 | """ 2 | Since it takes a while to find the right header lines in MKL, 3 | this script copies just the ones we need into a new file called 'mkl_funcs.py'. 4 | """ 5 | 6 | def get_lines(fn): return [o.strip() for o in open(fn).readlines()] 7 | 8 | fns = 'cblas vml ipps rng rngi'.split() 9 | #fns = 'cblas vml ipps'.split() 10 | cblas_lines,vml_lines,ipp_lines,rng_lines,rngi_lines = map( 11 | #cblas_lines,vml_lines,ipp_lines = map( 12 | get_lines, [f'all_{o}.h' for o in fns]) 13 | 14 | f = open('mkl_funcs.py', 'w') 15 | print('### AUTO-GENERATED BY get_headers.py ###\n', file=f) 16 | for o in fns: print(f'{o}_lines={get_lines("all_"+o+".h")}', file=f) 17 | 18 | -------------------------------------------------------------------------------- /Sources/SwiftyMKL/MathFunctions.swift.gyb: -------------------------------------------------------------------------------- 1 | import CBaseMath 2 | import BaseMath 3 | import CIPL 4 | 5 | %{ 6 | import sys; sys.path.append('../..') 7 | from funcs import * 8 | 9 | all_h = [MklHeader(o) for o in cblas_lines+vml_lines+ipps_lines+rng_lines] 10 | }% 11 | 12 | public protocol SupportsMKL:SupportsBasicMath { 13 | typealias Element=Self 14 | typealias PtrT = UnsafePointer 15 | typealias MutPtrT = UnsafeMutablePointer 16 | 17 | % for h in all_h: 18 | ${h.decl_all()} 19 | % end 20 | } 21 | 22 | % for t,l,n in typ_typs: 23 | extension ${t} : SupportsMKL { 24 | % for h in all_h: 25 | ${h.impl_all(t)} 26 | % end 27 | } 28 | % end # t 29 | 30 | -------------------------------------------------------------------------------- /Sources/SwiftyMKL/mkl.swift: -------------------------------------------------------------------------------- 1 | import CIPL 2 | 3 | public struct MKL { 4 | public static func get_version_string()->String { 5 | var d = Array(repeating: 0, count: 180) 6 | mkl_get_version_string(&d, numericCast(d.count)) 7 | return String(cString: UnsafePointer(d)) 8 | } 9 | 10 | public static func get_version()->MKLVersion { 11 | var version = MKLVersion() 12 | mkl_get_version(&version) 13 | return version 14 | } 15 | } 16 | 17 | 18 | // typedefs from MKL headers that Swift doesn't handle automatically 19 | 20 | public let mkl_get_version_string = MKL_Get_Version_String 21 | public let mkl_get_version = MKL_Get_Version 22 | public let mkl_malloc = MKL_malloc 23 | public let mkl_free = MKL_free 24 | 25 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift.gyb: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import SwiftyMKLTests 3 | 4 | %{ 5 | import re 6 | lines = open('SwiftyMKLTests/SwiftyMKLTests.swift.gyb', 'r').readlines() 7 | tests = [o.strip() for o in lines if re.search('func test', o)] 8 | names = [re.search(r'func (test\w*)\(', o).group(1) for o in tests] 9 | types = ('Float', 'Double') 10 | }% 11 | 12 | % for t in types: 13 | % for s in ('VectorP', 'Array'): 14 | extension SwiftyMKLTests${s}${t} { 15 | static var allTests : [(String, (SwiftyMKLTests${s}${t})->()->())] { 16 | return [ 17 | % for n in names: 18 | ("${n}", ${n}), 19 | % end # n 20 | ] 21 | } 22 | } 23 | % end # s 24 | % end # t 25 | 26 | XCTMain([ 27 | % for t in types: 28 | % for s in ('VectorP', 'Array'): 29 | testCase(SwiftyMKLTests${s}${t}.allTests), 30 | % end # s 31 | % end # t 32 | ]) 33 | 34 | -------------------------------------------------------------------------------- /Sources/SwiftyMKL/Vector.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import BaseMath 3 | 4 | public protocol Vector: BaseVector, CustomStringConvertible where Element:SupportsMKL { } 5 | 6 | extension Vector { } 7 | 8 | public struct VectorP: Vector, ComposedStorage { 9 | public typealias Element=T 10 | 11 | public var data:AlignedStorage 12 | public init(_ data:AlignedStorage) { self.data = data } 13 | public init(_ data:UnsafeMutableBufferPointer) { self.init(AlignedStorage(data)) } 14 | 15 | public init(_ count:Int) { self.init(AlignedStorage(count)) } 16 | public init(_ array:Array) { self.init(AlignedStorage(array)) } 17 | 18 | public var p:MutPtrT {get {return data.p}} 19 | public func copy() -> VectorP { return .init(data.copy()) } 20 | 21 | public var description: String { return "A\(Array(self).description)" } 22 | } 23 | 24 | extension Array: Vector where Element:SupportsMKL { } 25 | 26 | -------------------------------------------------------------------------------- /custom/missing_list: -------------------------------------------------------------------------------- 1 | vsExp2 2 | vsExp10 3 | vsLog2 4 | vsLogb 5 | vsCospi 6 | vsSinpi 7 | vsTanpi 8 | vsCosd 9 | vsSind 10 | vsTand 11 | vsAcospi 12 | vsAsinpi 13 | vsAtanpi 14 | vsAtan2pi 15 | vsPowr 16 | vsFrac 17 | vsFmod 18 | vsRemainder 19 | vsNextAfter 20 | vsCopySign 21 | vsFdim 22 | vsFmax 23 | vsFmin 24 | vsMaxMag 25 | vsMinMag 26 | vsExpInt1 27 | cblas_saxpby 28 | cblas_sgemmt 29 | cblas_sgemm_pack_get_size 30 | cblas_sgemm_pack 31 | cblas_sgemm_compute 32 | cblas_sgemm_free 33 | cblas_daxpby 34 | cblas_dgemmt 35 | cblas_dgemm_pack_get_size 36 | cblas_dgemm_pack 37 | cblas_dgemm_compute 38 | cblas_dgemm_free 39 | vdExp2 40 | vdExp10 41 | vdLog2 42 | vdLogb 43 | vdCospi 44 | vdSinpi 45 | vdTanpi 46 | vdCosd 47 | vdSind 48 | vdTand 49 | vdAcospi 50 | vdAsinpi 51 | vdAtanpi 52 | vdAtan2pi 53 | vdPowr 54 | vdFrac 55 | vdFmod 56 | vdRemainder 57 | vdNextAfter 58 | vdCopySign 59 | vdFdim 60 | vdFmax 61 | vdFmin 62 | vdMaxMag 63 | vdMinMag 64 | vdExpInt1 65 | viRngUniform 66 | viRngBinomial 67 | viRngNegBinomial 68 | viRngBernoulli 69 | viRngGeometric 70 | viRngPoisson 71 | MKL_Get_Version_String 72 | MKL_Get_Version 73 | MKL_malloc 74 | MKL_free 75 | mkl_serv_finalize 76 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Swifty MKL 2 | 3 | A Swift wrapper for Intel Performance Libraries. 4 | 5 | ## Current status 6 | 7 | The `Vector` protocol provides access to the Intel Performance Libraries' 8 | functionality, supports RandomAccessCollection, MutableCollection, 9 | ExpressibleByArrayLiteral, and CustomStringConvertible, and is added as an 10 | extension to: 11 | 12 | - Regular swift arrays 13 | - `struct VectorP`, which aligns storage on 64bit boundaries for better performance 14 | 15 | Currently provided (more to come!): 16 | 17 | - Basic unary and binary MKL and IPP functions 18 | - MKL random number generators 19 | - Standard math ops on scalars and vectors, and optimized in-place assignment versions 20 | - Packing functions using increment, indices, and masks 21 | 22 | ## Building 23 | 24 | Tested on Windows 10 and MacOS 10. No prerequisites other than standard Swift 25 | command line tools. 26 | 27 | Running `make` will download and unzip an appropriate MKL/IPP custom lib for 28 | your system (if not done before) and build the library. For release mode (up to 29 | 100x faster!) run `make mode=release`. You can add `mode=release` to any of the 30 | below make commands too: 31 | 32 | - `make run`: run a small benchmark 33 | - `make test`: unit tests (Swift on Mac doesn't know how to find them however, 34 | but works fine on Linux) 35 | 36 | -------------------------------------------------------------------------------- /all_rngi.h: -------------------------------------------------------------------------------- 1 | _Mkl_Api(int,viRngBernoulli,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a)) 2 | _Mkl_Api(int,viRngUniform,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int a, const int b)) 3 | _Mkl_Api(int,viRngGeometric,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a)) 4 | _Mkl_Api(int,viRngBinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int , const double )) 5 | _Mkl_Api(int,viRngMultinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int a, const int b, const double * c)) 6 | _Mkl_Api(int,viRngHypergeometric,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int a, const int b, const int c)) 7 | _Mkl_Api(int,viRngNegbinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a, const double b)) 8 | _Mkl_Api(int,viRngNegBinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a, const double b)) 9 | _Mkl_Api(int,viRngPoisson,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a )) 10 | _Mkl_Api(int,viRngPoissonV,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double * a)) 11 | -------------------------------------------------------------------------------- /Sources/mkl-tool/main.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import CoreFoundation 3 | import CBaseMath 4 | import BaseMath 5 | import SwiftyMKL 6 | 7 | IPP.setup() 8 | 9 | func benchmarkTime(f: ()->()) -> Double { 10 | let start = CFAbsoluteTimeGetCurrent() 11 | for _ in 0..<10 {f()} 12 | return CFAbsoluteTimeGetCurrent() - start 13 | } 14 | 15 | func benchmark(title:String, f:()->()) { 16 | f() 17 | let time = benchmarkTime(f:f) 18 | print("Time for \(title): \(time) s.") 19 | } 20 | 21 | public typealias E=Float 22 | //public typealias E=Double 23 | public typealias T = VectorP 24 | let size = 100000 25 | var ptr = T(size) 26 | ptr.set(1.0) 27 | ptr[3] = -1.2 28 | ptr[5] = 0.2 29 | var ptr2 = ptr.copy() 30 | var ar1 = Array(ptr) 31 | var ar2 = Array(ptr) 32 | 33 | let p = ptr.p 34 | let p2 = ptr2.p 35 | let c:Int32 = numericCast(ptr.c) 36 | 37 | func sumO(_ n:Int, _ p1:UnsafeMutablePointer)->E { 38 | var r = E(0.0) 39 | for i in 0..Element { return asum(1) } 18 | @inlinable public func nrm2()->Element { return nrm2(1) } 19 | @inlinable public func dot(_ b:Self)->Element { return dot(1, b, 1) } 20 | @inlinable public func set(_ b: Element) { set(b,self) } 21 | @inlinable public func zero() { zero(self) } 22 | @inlinable public func move(_ b:Self, _ n:Int) { Element.move(p, b.p, n) } 23 | @inlinable public func move(_ b:Self, _ n:Int, fromIdx:Int, toIdx:Int) { Element.move(p+fromIdx, b.p+toIdx, n) } 24 | 25 | % for o in map(lower1,vml1): 26 | @inlinable public func ${o}_() { ${o}(self) } 27 | @inlinable public func ${o}() -> Self { return new_call(${o}) } 28 | % end # vml1 29 | 30 | % for o in map(lower1,vml2): 31 | @inlinable public func ${o}_(_ b:Self) { ${o}(b, self) } 32 | @inlinable public func ${o}(_ b:Self)->Self { return new_call(${o}, b) } 33 | % end # vml2 34 | 35 | @inlinable func ipp_reduce(_ f:(Self)->())->Element { let res = Self.init(1); f(res); return res[0] } 36 | 37 | % for o in map(lower1,ipp1): 38 | @inlinable public func ${o}()->Element { return ipp_reduce(${o}) } 39 | % end # ipp1 40 | 41 | % for o in map(lower1,ipp3): 42 | @inlinable public func ${o}(_ b:Self)->Element {return ipp_reduce({${o}(b, $0)})} 43 | % end # ipp3 44 | 45 | @inlinable public func powx_(_ b:Element) { powx(b, self) } 46 | @inlinable public func powx(_ b:Element)->Self { return new_call(powx, b) } 47 | 48 | @inlinable public func packIncrement(_ incr:Int, _ from:Int, _ n:Int, _ dest:Self) { Element.packI(n, p+from, incr, dest.p) } 49 | @inlinable public func packIncrement(_ incr:Int, _ from:Int, _ n:Int)->Self { 50 | let res = new(n); packIncrement(incr, from, n, res); return res 51 | } 52 | @inlinable public func packIndices(_ idxs:[Int32], _ dest:Self) { Element.packV(idxs.count, p, idxs, dest.p) } 53 | @inlinable public func packMasked( _ mask:[Int32], _ dest:Self) { Element.packM(mask.count, p, mask, dest.p) } 54 | @inlinable public func packIndices(_ idxs:[Int32])->Self { return new_call(packIndices, idxs, n:idxs.count) } 55 | @inlinable public func packMasked( _ mask:[Int32])->Self { return new_call(packMasked, mask, n:Int(mask.reduce(0,+))) } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ifeq ($(mode),) 2 | mode := debug 3 | endif 4 | 5 | xtra_args := -Xswiftc -Ounchecked $(addprefix -Xcc ,-ffast-math -O3 -march=native) 6 | #xtra_args := #$(xtra_args) $(addprefix -Xcc ,-Rpass-missed=loop-vectorize -Rpass=loop-vectorize) # -Xllvm -force-vector-width=4 -Xllvm -force-vector-interleave=4) 7 | 8 | UNAME = ${shell uname} 9 | ifeq ($(UNAME), Darwin) 10 | PLATFORM = x86_64-apple-macosx* 11 | EXECUTABLE = ./.build/${PLATFORM}/${mode} 12 | LIB_SUF = dylib 13 | xtra_args := $(xtra_args) -Xlinker -rpath -Xlinker ${shell pwd}/Darwin 14 | else ifeq ($(UNAME), Linux) 15 | PLATFORM = x86_64-unknown-linux 16 | EXECUTABLE = ./.build/${PLATFORM}/${mode} 17 | LIB_SUF = so 18 | endif 19 | 20 | # Use these if linking against full IPP/MKL 21 | #libs := $(addprefix -l,ippi ipps ippvm ippcore mkl_intel_lp64 mkl_sequential mkl_core m pthread dl) 22 | #libs_args := -Xcc -I${MKLROOT}/include -Xcc -I${IPPROOT}/include $(addprefix -Xlinker ,-L${MKLROOT}/lib -L${IPPROOT}/lib $(libs)) 23 | 24 | # Use these if linking against custom lib (recommended) 25 | custom := ./$(UNAME) 26 | libs_args := -Xcc -I$(custom) -Xlinker -L$(custom) 27 | prefix := LD_LIBRARY_PATH=$(custom) 28 | 29 | link_args := $(libs_args) $(xtra_args) 30 | 31 | gybs := $(shell find Sources Tests -type f -name '*.gyb') 32 | conv_gybs := $(patsubst %.gyb,%,$(gybs)) 33 | sources := $(conv_gybs) $(shell find Sources Tests -type f -name '*.swift') 34 | sources := $(sources) $(shell find Sources Tests -type f -name '*.c') 35 | sources := $(sources) $(shell find Sources Tests -type f -name '*.h') 36 | headers := $(wildcard all_%.h) 37 | 38 | yaml := ./.build/${mode}.yaml 39 | run_args := -c $(mode) $(link_args) 40 | custom_dir := $(UNAME)/.dirstamp 41 | 42 | all: $(yaml) 43 | 44 | run: $(yaml) 45 | $(prefix) swift run $(run_args) 46 | 47 | test: $(yaml) 48 | $(prefix) swift test $(run_args) 49 | 50 | $(yaml): gyb $(custom_dir) 51 | swift build -v $(run_args) 52 | 53 | Tests/LinuxMain.swift: Tests/SwiftyMKLTests/SwiftyMKLTests.swift 54 | 55 | gyb: $(sources) 56 | 57 | $(custom_dir): $(UNAME).tgz 58 | tar xf $(UNAME).tgz 59 | touch $(custom_dir) 60 | 61 | $(UNAME).tgz: 62 | wget http://files.fast.ai/files/$(UNAME).tgz 63 | 64 | %.swift: %.swift.gyb 65 | gyb --line-directive '' -o $@ $< 66 | 67 | %.c: %.c.gyb 68 | gyb --line-directive '' -o $@ $< 69 | 70 | %.h: %.h.gyb 71 | gyb --line-directive '' -o $@ $< 72 | 73 | Sources/SwiftyMKL/MathFunctions.swift Sources/SwiftyMKL/Vector-impl.swift: mkl_funcs.py funcs.py 74 | 75 | mkl_funcs.py: get_headers.py $(headers) 76 | python get_headers.py 77 | 78 | .PHONY: clean 79 | clean: 80 | rm -rf .build $(conv_gybs) 81 | 82 | -------------------------------------------------------------------------------- /custom/sparseblas_list: -------------------------------------------------------------------------------- 1 | mkl_sparse_s_create_coo 2 | mkl_sparse_d_create_coo 3 | mkl_sparse_c_create_coo 4 | mkl_sparse_z_create_coo 5 | mkl_sparse_s_create_csr 6 | mkl_sparse_d_create_csr 7 | mkl_sparse_c_create_csr 8 | mkl_sparse_z_create_csr 9 | mkl_sparse_s_create_csc 10 | mkl_sparse_d_create_csc 11 | mkl_sparse_c_create_csc 12 | mkl_sparse_z_create_csc 13 | mkl_sparse_s_create_bsr 14 | mkl_sparse_d_create_bsr 15 | mkl_sparse_c_create_bsr 16 | mkl_sparse_z_create_bsr 17 | mkl_sparse_copy 18 | mkl_sparse_destroy 19 | mkl_sparse_get_error_info 20 | mkl_sparse_convert_csr 21 | mkl_sparse_convert_bsr 22 | mkl_sparse_s_export_bsr 23 | mkl_sparse_d_export_bsr 24 | mkl_sparse_c_export_bsr 25 | mkl_sparse_z_export_bsr 26 | mkl_sparse_s_export_csr 27 | mkl_sparse_d_export_csr 28 | mkl_sparse_c_export_csr 29 | mkl_sparse_z_export_csr 30 | mkl_sparse_s_export_csc 31 | mkl_sparse_d_export_csc 32 | mkl_sparse_c_export_csc 33 | mkl_sparse_z_export_csc 34 | mkl_sparse_s_set_value 35 | mkl_sparse_d_set_value 36 | mkl_sparse_c_set_value 37 | mkl_sparse_z_set_value 38 | mkl_sparse_set_verbose_mode 39 | mkl_sparse_set_mv_hint 40 | mkl_sparse_set_dotmv_hint 41 | mkl_sparse_set_mm_hint 42 | mkl_sparse_set_sv_hint 43 | mkl_sparse_set_sm_hint 44 | mkl_sparse_set_symgs_hint 45 | mkl_sparse_set_memory_hint 46 | mkl_sparse_optimize 47 | mkl_sparse_order 48 | mkl_sparse_s_mv 49 | mkl_sparse_d_mv 50 | mkl_sparse_c_mv 51 | mkl_sparse_z_mv 52 | mkl_sparse_s_dotmv 53 | mkl_sparse_d_dotmv 54 | mkl_sparse_c_dotmv 55 | mkl_sparse_z_dotmv 56 | mkl_sparse_s_trsv 57 | mkl_sparse_d_trsv 58 | mkl_sparse_c_trsv 59 | mkl_sparse_z_trsv 60 | mkl_sparse_s_symgs 61 | mkl_sparse_d_symgs 62 | mkl_sparse_c_symgs 63 | mkl_sparse_z_symgs 64 | mkl_sparse_s_symgs_mv 65 | mkl_sparse_d_symgs_mv 66 | mkl_sparse_c_symgs_mv 67 | mkl_sparse_z_symgs_mv 68 | mkl_sparse_s_mm 69 | mkl_sparse_d_mm 70 | mkl_sparse_c_mm 71 | mkl_sparse_z_mm 72 | mkl_sparse_s_trsm 73 | mkl_sparse_d_trsm 74 | mkl_sparse_c_trsm 75 | mkl_sparse_z_trsm 76 | mkl_sparse_s_add 77 | mkl_sparse_d_add 78 | mkl_sparse_c_add 79 | mkl_sparse_z_add 80 | mkl_sparse_spmm 81 | mkl_sparse_sp2m 82 | mkl_sparse_syrk 83 | mkl_sparse_sypr 84 | mkl_sparse_s_syprd 85 | mkl_sparse_d_syprd 86 | mkl_sparse_c_syprd 87 | mkl_sparse_z_syprd 88 | mkl_sparse_s_spmmd 89 | mkl_sparse_d_spmmd 90 | mkl_sparse_c_spmmd 91 | mkl_sparse_z_spmmd 92 | mkl_sparse_s_sp2md 93 | mkl_sparse_d_sp2md 94 | mkl_sparse_c_sp2md 95 | mkl_sparse_z_sp2md 96 | mkl_sparse_s_syrkd 97 | mkl_sparse_d_syrkd 98 | mkl_sparse_c_syrkd 99 | mkl_sparse_z_syrkd 100 | -------------------------------------------------------------------------------- /custom/cblas_list: -------------------------------------------------------------------------------- 1 | cblas_caxpy 2 | cblas_caxpyi 3 | cblas_ccopy 4 | cblas_cgbmv 5 | cblas_cgemm 6 | cblas_cgemv 7 | cblas_cgerc 8 | cblas_cgeru 9 | cblas_cgthr 10 | cblas_cgthrz 11 | cblas_chbmv 12 | cblas_chemm 13 | cblas_chemv 14 | cblas_cher 15 | cblas_cher2 16 | cblas_cher2k 17 | cblas_cherk 18 | cblas_chpmv 19 | cblas_chpr 20 | cblas_chpr2 21 | cblas_crotg 22 | cblas_cscal 23 | cblas_csctr 24 | cblas_csrot 25 | cblas_csscal 26 | cblas_cswap 27 | cblas_csymm 28 | cblas_csyr2k 29 | cblas_csyrk 30 | cblas_ctbmv 31 | cblas_ctbsv 32 | cblas_ctpmv 33 | cblas_ctpsv 34 | cblas_ctrmm 35 | cblas_ctrmv 36 | cblas_ctrsm 37 | cblas_ctrsv 38 | cblas_dasum 39 | cblas_daxpy 40 | cblas_daxpyi 41 | cblas_dcopy 42 | cblas_ddot 43 | cblas_ddoti 44 | cblas_dgbmv 45 | cblas_dgemm 46 | cblas_dgemv 47 | cblas_dger 48 | cblas_dgthr 49 | cblas_dgthrz 50 | cblas_dnrm2 51 | cblas_drot 52 | cblas_drotg 53 | cblas_droti 54 | cblas_drotm 55 | cblas_drotmg 56 | cblas_dsbmv 57 | cblas_dscal 58 | cblas_dsctr 59 | cblas_dsdot 60 | cblas_dspmv 61 | cblas_dspr 62 | cblas_dspr2 63 | cblas_dswap 64 | cblas_dsymm 65 | cblas_dsymv 66 | cblas_dsyr 67 | cblas_dsyr2 68 | cblas_dsyr2k 69 | cblas_dsyrk 70 | cblas_dtbmv 71 | cblas_dtbsv 72 | cblas_dtpmv 73 | cblas_dtpsv 74 | cblas_dtrmm 75 | cblas_dtrmv 76 | cblas_dtrsm 77 | cblas_dtrsv 78 | cblas_dzasum 79 | cblas_dznrm2 80 | cblas_icamax 81 | cblas_icamin 82 | cblas_idamax 83 | cblas_idamin 84 | cblas_isamax 85 | cblas_isamin 86 | cblas_izamax 87 | cblas_izamin 88 | cblas_sasum 89 | cblas_saxpy 90 | cblas_saxpyi 91 | cblas_scasum 92 | cblas_scnrm2 93 | cblas_scopy 94 | cblas_sdot 95 | cblas_sdoti 96 | cblas_sdsdot 97 | cblas_sgbmv 98 | cblas_sgemm 99 | cblas_sgemv 100 | cblas_sger 101 | cblas_sgthr 102 | cblas_sgthrz 103 | cblas_snrm2 104 | cblas_srot 105 | cblas_srotg 106 | cblas_sroti 107 | cblas_srotm 108 | cblas_srotmg 109 | cblas_ssbmv 110 | cblas_sscal 111 | cblas_ssctr 112 | cblas_sspmv 113 | cblas_sspr 114 | cblas_sspr2 115 | cblas_sswap 116 | cblas_ssymm 117 | cblas_ssymv 118 | cblas_ssyr 119 | cblas_ssyr2 120 | cblas_ssyr2k 121 | cblas_ssyrk 122 | cblas_stbmv 123 | cblas_stbsv 124 | cblas_stpmv 125 | cblas_stpsv 126 | cblas_strmm 127 | cblas_strmv 128 | cblas_strsm 129 | cblas_strsv 130 | cblas_zaxpy 131 | cblas_zaxpyi 132 | cblas_zcopy 133 | cblas_zdrot 134 | cblas_zdscal 135 | cblas_zgbmv 136 | cblas_zgemm 137 | cblas_zgemv 138 | cblas_zgerc 139 | cblas_zgeru 140 | cblas_zgthr 141 | cblas_zgthrz 142 | cblas_zhbmv 143 | cblas_zhemm 144 | cblas_zhemv 145 | cblas_zher 146 | cblas_zher2 147 | cblas_zher2k 148 | cblas_zherk 149 | cblas_zhpmv 150 | cblas_zhpr 151 | cblas_zhpr2 152 | cblas_zrotg 153 | cblas_zscal 154 | cblas_zsctr 155 | cblas_zswap 156 | cblas_zsymm 157 | cblas_zsyr2k 158 | cblas_zsyrk 159 | cblas_ztbmv 160 | cblas_ztbsv 161 | cblas_ztpmv 162 | cblas_ztpsv 163 | cblas_ztrmm 164 | cblas_ztrmv 165 | cblas_ztrsm 166 | cblas_ztrsv 167 | -------------------------------------------------------------------------------- /custom/list_ipp: -------------------------------------------------------------------------------- 1 | ippInit 2 | ippsGetLibVersion 3 | ippsCopy_32f 4 | ippsMove_32f 5 | ippsSet_32f 6 | ippsZero_32f 7 | ippsTriangle_32f 8 | ippsVectorJaehne_32f 9 | ippsVectorSlope_32f 10 | ippsAddC_32f 11 | ippsAddProduct_32f 12 | ippsMulC_32f 13 | ippsSubC_32f 14 | ippsSubCRev_32f 15 | ippsDivC_32f 16 | ippsSumLn_32f 17 | ippsArctan_32f 18 | ippsNormalize_32f 19 | ippsMagnitude_32f 20 | ippsPhase_32f 21 | ippsPowerSpectr_32f 22 | ippsThreshold_LT_32f 23 | ippsThreshold_GT_32f 24 | ippsThreshold_LTAbs_32f 25 | ippsThreshold_GTAbs_32f 26 | ippsThreshold_LTAbsVal_32f 27 | ippsThreshold_LTVal_32f 28 | ippsThreshold_GTVal_32f 29 | ippsThreshold_LTValGTVal_32f 30 | ippsThreshold_LTInv_32f 31 | ippsCartToPolar_32f 32 | ippsPolarToCart_32f 33 | ippsFlip_32f 34 | ippsWinBartlett_32f 35 | ippsWinHann_32f 36 | ippsWinHamming_32f 37 | ippsWinBlackman_32f 38 | ippsWinBlackmanStd_32f 39 | ippsWinBlackmanOpt_32f 40 | ippsWinKaiser_32f 41 | ippsSum_32f 42 | ippsMin_32f 43 | ippsMax_32f 44 | ippsMinMax_32f 45 | ippsMinAbs_32f 46 | ippsMaxAbs_32f 47 | ippsMinIndx_32f 48 | ippsMaxIndx_32f 49 | ippsMinMaxIndx_32f 50 | ippsMean_32f 51 | ippsStdDev_32f 52 | ippsMeanStdDev_32f 53 | ippsNorm_Inf_32f 54 | ippsNorm_L1_32f 55 | ippsNorm_L2_32f 56 | ippsNormDiff_Inf_32f 57 | ippsNormDiff_L1_32f 58 | ippsNormDiff_L2_32f 59 | ippsDotProd_32f 60 | ippsMinEvery_32f 61 | ippsMaxEvery_32f 62 | ippsMaxOrder_32f 63 | ippsSampleUp_32f 64 | ippsSampleDown_32f 65 | ippsFilterMedian_32f 66 | ippsCopy_64f 67 | ippsMove_64f 68 | ippsSet_64f 69 | ippsZero_64f 70 | ippsTriangle_64f 71 | ippsVectorJaehne_64f 72 | ippsVectorSlope_64f 73 | ippsAddC_64f 74 | ippsAddProduct_64f 75 | ippsMulC_64f 76 | ippsSubC_64f 77 | ippsSubCRev_64f 78 | ippsDivC_64f 79 | ippsSumLn_64f 80 | ippsArctan_64f 81 | ippsNormalize_64f 82 | ippsMagnitude_64f 83 | ippsPhase_64f 84 | ippsPowerSpectr_64f 85 | ippsThreshold_LT_64f 86 | ippsThreshold_GT_64f 87 | ippsThreshold_LTAbs_64f 88 | ippsThreshold_GTAbs_64f 89 | ippsThreshold_LTAbsVal_64f 90 | ippsThreshold_LTVal_64f 91 | ippsThreshold_GTVal_64f 92 | ippsThreshold_LTValGTVal_64f 93 | ippsThreshold_LTInv_64f 94 | ippsCartToPolar_64f 95 | ippsPolarToCart_64f 96 | ippsFlip_64f 97 | ippsWinBartlett_64f 98 | ippsWinHann_64f 99 | ippsWinHamming_64f 100 | ippsWinBlackman_64f 101 | ippsWinBlackmanStd_64f 102 | ippsWinBlackmanOpt_64f 103 | ippsWinKaiser_64f 104 | ippsSum_64f 105 | ippsMin_64f 106 | ippsMax_64f 107 | ippsMinMax_64f 108 | ippsMinAbs_64f 109 | ippsMaxAbs_64f 110 | ippsMinIndx_64f 111 | ippsMaxIndx_64f 112 | ippsMinMaxIndx_64f 113 | ippsMean_64f 114 | ippsStdDev_64f 115 | ippsMeanStdDev_64f 116 | ippsNorm_Inf_64f 117 | ippsNorm_L1_64f 118 | ippsNorm_L2_64f 119 | ippsNormDiff_Inf_64f 120 | ippsNormDiff_L1_64f 121 | ippsNormDiff_L2_64f 122 | ippsDotProd_64f 123 | ippsMinEvery_64f 124 | ippsMaxEvery_64f 125 | ippsMaxOrder_64f 126 | ippsSampleUp_64f 127 | ippsSampleDown_64f 128 | ippsFilterMedian_64f 129 | -------------------------------------------------------------------------------- /basic.swift: -------------------------------------------------------------------------------- 1 | // This file shows a minimal sketch of how the main pieces fit together. 2 | // None of this file is actually used in the library. It's just here to make it easier to see what's going on 3 | // and try different ideas out. 4 | 5 | // These 2 funcs are placeholders - actually would come from MKL 6 | func cblas_sasum(_ c:Int32, _ d:Array, _ n:Int32)->Float { return d.reduce(0.0) {$0 + abs($1)} } 7 | func cblas_dasum(_ c:Int32, _ d:Array, _ n:Int32)->Double { return d.reduce(0.0) {$0 + abs($1)} } 8 | 9 | public protocol VectorBase : 10 | RandomAccessCollection, MutableCollection, ExpressibleByArrayLiteral where Element==Scalar { 11 | associatedtype Scalar 12 | associatedtype Storage:MutableCollection where Storage.Element==Scalar, Storage.Index==Int 13 | var data:Storage {get set} 14 | init(_ data_:Storage) 15 | init(_ data_:Array) 16 | } 17 | 18 | extension VectorBase { 19 | public var count:Int {get {return data.count}} 20 | public var c:Int32 {get {return numericCast(count)}} 21 | 22 | // ExpressibleByArrayLiteral 23 | public init(arrayLiteral data_: Scalar...) { self.init(data_) } 24 | // RandomAccessCollection 25 | public var indices: Range { return 0.. Scalar { 30 | get { return data[i] } 31 | set { data[i] = newValue } 32 | } 33 | } 34 | 35 | // float sasum(const MKL_INT *n, const float *x, const MKL_INT *incx); 36 | public protocol SupportsMKL:BinaryFloatingPoint { 37 | typealias T=Self 38 | static func asum(_ n:Int32, _ x:Array, _ incx:Int32)->Self 39 | } 40 | extension Double:SupportsMKL { 41 | public static func asum(_ n:Int32, _ x:Array, _ incx:Int32)->T { return cblas_dasum(n,x,incx) } 42 | } 43 | extension Float:SupportsMKL { 44 | public static func asum(_ n:Int32, _ x:Array, _ incx:Int32)->T { return cblas_sasum(n,x,incx) } 45 | } 46 | 47 | public class ArrayStorage: VectorBase { 48 | public typealias Scalar=T 49 | public var data:Array 50 | public required init(_ data_:Array) {data=data_} 51 | public var p:Array {return data} 52 | } 53 | 54 | public protocol VectorProtocol: VectorBase 55 | where Storage==ArrayStorage, Scalar:SupportsMKL { 56 | } 57 | 58 | //public static func asum(_ a:ArrayStorage)->Double { return cblas_dasum(a.c, a.p, 1) } 59 | extension VectorProtocol { 60 | public init(_ data_:Array) {self.init(ArrayStorage(data_))} 61 | public var p:Array {return data.p} 62 | func asum()->Scalar { return Scalar.asum(c, p, 1) } 63 | } 64 | 65 | public struct Vector: VectorProtocol { 66 | public var data:ArrayStorage 67 | public init(_ data_:ArrayStorage) {data=data_} 68 | } 69 | 70 | let a:Vector = [1.0, 2, 4] 71 | print(a.asum()) 72 | 73 | protocol P { 74 | associatedtype T:VectorProtocol 75 | var v:T {get} 76 | func f() 77 | } 78 | extension P { 79 | public func f() { 80 | print(v.asum()) 81 | } 82 | } 83 | struct F:P { 84 | let v:Vector = [1.0,2] 85 | } 86 | let b = F() 87 | b.f() 88 | 89 | -------------------------------------------------------------------------------- /custom/cblas_example_list: -------------------------------------------------------------------------------- 1 | ;=============================================================================== 2 | ; Copyright 2006-2018 Intel Corporation. 3 | ; 4 | ; This software and the related documents are Intel copyrighted materials, and 5 | ; your use of them is governed by the express license under which they were 6 | ; provided to you (License). Unless the License provides otherwise, you may not 7 | ; use, modify, copy, publish, distribute, disclose or transmit this software or 8 | ; the related documents without Intel's prior written permission. 9 | ; 10 | ; This software and the related documents are provided as is, with no express 11 | ; or implied warranties, other than those that are expressly stated in the 12 | ; License. 13 | ;=============================================================================== 14 | 15 | cblas_caxpy 16 | cblas_caxpyi 17 | cblas_ccopy 18 | cblas_cgbmv 19 | cblas_cgemm 20 | cblas_cgemv 21 | cblas_cgerc 22 | cblas_cgeru 23 | cblas_cgthr 24 | cblas_cgthrz 25 | cblas_chbmv 26 | cblas_chemm 27 | cblas_chemv 28 | cblas_cher 29 | cblas_cher2 30 | cblas_cher2k 31 | cblas_cherk 32 | cblas_chpmv 33 | cblas_chpr 34 | cblas_chpr2 35 | cblas_crotg 36 | cblas_cscal 37 | cblas_csctr 38 | cblas_csrot 39 | cblas_csscal 40 | cblas_cswap 41 | cblas_csymm 42 | cblas_csyr2k 43 | cblas_csyrk 44 | cblas_ctbmv 45 | cblas_ctbsv 46 | cblas_ctpmv 47 | cblas_ctpsv 48 | cblas_ctrmm 49 | cblas_ctrmv 50 | cblas_ctrsm 51 | cblas_ctrsv 52 | cblas_dasum 53 | cblas_daxpy 54 | cblas_daxpyi 55 | cblas_dcopy 56 | cblas_ddot 57 | cblas_ddoti 58 | cblas_dgbmv 59 | cblas_dgemm 60 | cblas_dgemv 61 | cblas_dger 62 | cblas_dgthr 63 | cblas_dgthrz 64 | cblas_dnrm2 65 | cblas_drot 66 | cblas_drotg 67 | cblas_droti 68 | cblas_drotm 69 | cblas_drotmg 70 | cblas_dsbmv 71 | cblas_dscal 72 | cblas_dsctr 73 | cblas_dsdot 74 | cblas_dspmv 75 | cblas_dspr 76 | cblas_dspr2 77 | cblas_dswap 78 | cblas_dsymm 79 | cblas_dsymv 80 | cblas_dsyr 81 | cblas_dsyr2 82 | cblas_dsyr2k 83 | cblas_dsyrk 84 | cblas_dtbmv 85 | cblas_dtbsv 86 | cblas_dtpmv 87 | cblas_dtpsv 88 | cblas_dtrmm 89 | cblas_dtrmv 90 | cblas_dtrsm 91 | cblas_dtrsv 92 | cblas_dzasum 93 | cblas_dznrm2 94 | cblas_icamax 95 | cblas_icamin 96 | cblas_idamax 97 | cblas_idamin 98 | cblas_isamax 99 | cblas_isamin 100 | cblas_izamax 101 | cblas_izamin 102 | cblas_sasum 103 | cblas_saxpy 104 | cblas_saxpyi 105 | cblas_scasum 106 | cblas_scnrm2 107 | cblas_scopy 108 | cblas_sdot 109 | cblas_sdoti 110 | cblas_sdsdot 111 | cblas_sgbmv 112 | cblas_sgemm 113 | cblas_sgemv 114 | cblas_sger 115 | cblas_sgthr 116 | cblas_sgthrz 117 | cblas_snrm2 118 | cblas_srot 119 | cblas_srotg 120 | cblas_sroti 121 | cblas_srotm 122 | cblas_srotmg 123 | cblas_ssbmv 124 | cblas_sscal 125 | cblas_ssctr 126 | cblas_sspmv 127 | cblas_sspr 128 | cblas_sspr2 129 | cblas_sswap 130 | cblas_ssymm 131 | cblas_ssymv 132 | cblas_ssyr 133 | cblas_ssyr2 134 | cblas_ssyr2k 135 | cblas_ssyrk 136 | cblas_stbmv 137 | cblas_stbsv 138 | cblas_stpmv 139 | cblas_stpsv 140 | cblas_strmm 141 | cblas_strmv 142 | cblas_strsm 143 | cblas_strsv 144 | cblas_zaxpy 145 | cblas_zaxpyi 146 | cblas_zcopy 147 | cblas_zdrot 148 | cblas_zdscal 149 | cblas_zgbmv 150 | cblas_zgemm 151 | cblas_zgemv 152 | cblas_zgerc 153 | cblas_zgeru 154 | cblas_zgthr 155 | cblas_zgthrz 156 | cblas_zhbmv 157 | cblas_zhemm 158 | cblas_zhemv 159 | cblas_zher 160 | cblas_zher2 161 | cblas_zher2k 162 | cblas_zherk 163 | cblas_zhpmv 164 | cblas_zhpr 165 | cblas_zhpr2 166 | cblas_zrotg 167 | cblas_zscal 168 | cblas_zsctr 169 | cblas_zswap 170 | cblas_zsymm 171 | cblas_zsyr2k 172 | cblas_zsyrk 173 | cblas_ztbmv 174 | cblas_ztbsv 175 | cblas_ztpmv 176 | cblas_ztpsv 177 | cblas_ztrmm 178 | cblas_ztrmv 179 | cblas_ztrsm 180 | cblas_ztrsv 181 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import SwiftyMKLTests 3 | 4 | 5 | extension SwiftyMKLTestsVectorPFloat { 6 | static var allTests : [(String, (SwiftyMKLTestsVectorPFloat)->()->())] { 7 | return [ 8 | ("testVersion", testVersion), 9 | ("testSum", testSum), 10 | ("testDot", testDot), 11 | ("testAbs", testAbs), 12 | ("testASum", testASum), 13 | ("testAdd", testAdd), 14 | ("testDiv", testDiv), 15 | ("testSubRev", testSubRev), 16 | ("testPowx", testPowx), 17 | ("testPow", testPow), 18 | ("testNormDiff_Inf", testNormDiff_Inf), 19 | ("testPackIncrement", testPackIncrement), 20 | ("testPackIndices", testPackIndices), 21 | ("testPackMasked", testPackMasked), 22 | ("testZero", testZero), 23 | ("testSet", testSet), 24 | ("testMove", testMove), 25 | ("testGaussian", testGaussian), 26 | ("testGaussianMulti1", testGaussianMulti1), 27 | ("testGaussianMulti2", testGaussianMulti2), 28 | ] 29 | } 30 | } 31 | extension SwiftyMKLTestsArrayFloat { 32 | static var allTests : [(String, (SwiftyMKLTestsArrayFloat)->()->())] { 33 | return [ 34 | ("testVersion", testVersion), 35 | ("testSum", testSum), 36 | ("testDot", testDot), 37 | ("testAbs", testAbs), 38 | ("testASum", testASum), 39 | ("testAdd", testAdd), 40 | ("testDiv", testDiv), 41 | ("testSubRev", testSubRev), 42 | ("testPowx", testPowx), 43 | ("testPow", testPow), 44 | ("testNormDiff_Inf", testNormDiff_Inf), 45 | ("testPackIncrement", testPackIncrement), 46 | ("testPackIndices", testPackIndices), 47 | ("testPackMasked", testPackMasked), 48 | ("testZero", testZero), 49 | ("testSet", testSet), 50 | ("testMove", testMove), 51 | ("testGaussian", testGaussian), 52 | ("testGaussianMulti1", testGaussianMulti1), 53 | ("testGaussianMulti2", testGaussianMulti2), 54 | ] 55 | } 56 | } 57 | extension SwiftyMKLTestsVectorPDouble { 58 | static var allTests : [(String, (SwiftyMKLTestsVectorPDouble)->()->())] { 59 | return [ 60 | ("testVersion", testVersion), 61 | ("testSum", testSum), 62 | ("testDot", testDot), 63 | ("testAbs", testAbs), 64 | ("testASum", testASum), 65 | ("testAdd", testAdd), 66 | ("testDiv", testDiv), 67 | ("testSubRev", testSubRev), 68 | ("testPowx", testPowx), 69 | ("testPow", testPow), 70 | ("testNormDiff_Inf", testNormDiff_Inf), 71 | ("testPackIncrement", testPackIncrement), 72 | ("testPackIndices", testPackIndices), 73 | ("testPackMasked", testPackMasked), 74 | ("testZero", testZero), 75 | ("testSet", testSet), 76 | ("testMove", testMove), 77 | ("testGaussian", testGaussian), 78 | ("testGaussianMulti1", testGaussianMulti1), 79 | ("testGaussianMulti2", testGaussianMulti2), 80 | ] 81 | } 82 | } 83 | extension SwiftyMKLTestsArrayDouble { 84 | static var allTests : [(String, (SwiftyMKLTestsArrayDouble)->()->())] { 85 | return [ 86 | ("testVersion", testVersion), 87 | ("testSum", testSum), 88 | ("testDot", testDot), 89 | ("testAbs", testAbs), 90 | ("testASum", testASum), 91 | ("testAdd", testAdd), 92 | ("testDiv", testDiv), 93 | ("testSubRev", testSubRev), 94 | ("testPowx", testPowx), 95 | ("testPow", testPow), 96 | ("testNormDiff_Inf", testNormDiff_Inf), 97 | ("testPackIncrement", testPackIncrement), 98 | ("testPackIndices", testPackIndices), 99 | ("testPackMasked", testPackMasked), 100 | ("testZero", testZero), 101 | ("testSet", testSet), 102 | ("testMove", testMove), 103 | ("testGaussian", testGaussian), 104 | ("testGaussianMulti1", testGaussianMulti1), 105 | ("testGaussianMulti2", testGaussianMulti2), 106 | ] 107 | } 108 | } 109 | 110 | XCTMain([ 111 | testCase(SwiftyMKLTestsVectorPFloat.allTests), 112 | testCase(SwiftyMKLTestsArrayFloat.allTests), 113 | testCase(SwiftyMKLTestsVectorPDouble.allTests), 114 | testCase(SwiftyMKLTestsArrayDouble.allTests), 115 | ]) 116 | 117 | -------------------------------------------------------------------------------- /Sources/SwiftyMKL/RandDistrib.swift.gyb: -------------------------------------------------------------------------------- 1 | import BaseMath 2 | import CIPL 3 | 4 | // #defines from mkl_vsl_defines.h not auto-converted by swift 5 | let VSL_BRNG_INC:Int32 = 1< 27 | vslNewStream(&ptr, VSL_BRNG_SFMT19937, UInt32.random(in: 0.. = p 32 | vslDeleteStream(&ptr) 33 | } 34 | } 35 | 36 | %{ 37 | types = ('Float', 'Double') 38 | rng_defs = [ 39 | "Gaussian VSL_RNG_METHOD_GAUSSIANMV_ICDF", 40 | "Uniform VSL_RNG_METHOD_UNIFORM_STD", 41 | "Exponential VSL_RNG_METHOD_EXPONENTIAL_ICDF", 42 | "Laplace VSL_RNG_METHOD_LAPLACE_ICDF", 43 | "Cauchy VSL_RNG_METHOD_CAUCHY_ICDF", 44 | "Rayleigh VSL_RNG_METHOD_RAYLEIGH_ICDF", 45 | "Gumbel VSL_RNG_METHOD_GUMBEL_ICDF" 46 | ] 47 | rng_defs = [o.split() for o in rng_defs] 48 | def lower1(s): return s[:1].lower() + s[1:] 49 | rng_defs = [(lower1(name), name, method) for name,method in rng_defs] 50 | 51 | ri1 = [ 52 | ('Uniform', 'VSL_RNG_METHOD_UNIFORM_STD', 'lowerinc', 'Int32', 'upperexc', 'Int32'), 53 | ('Binomial', 'VSL_RNG_METHOD_BINOMIAL_BTPE', 'ntrial', 'Int32','p', 'Double'), 54 | ('NegBinomial', 'VSL_RNG_METHOD_NEGBINOMIAL_NBAR', 'a', 'Double', 'p', 'Double') 55 | ] 56 | ri2 = [ 57 | ('Bernoulli', 'VSL_RNG_METHOD_BERNOULLI_ICDF', 'p'), 58 | ('Geometric', 'VSL_RNG_METHOD_GEOMETRIC_ICDF', 'p'), 59 | ('Poisson', 'VSL_RNG_METHOD_POISSON_PTPE', 'lambda') 60 | ] 61 | }% 62 | 63 | struct RandDistrib { 64 | var stream = RandDistribStream() 65 | 66 | % for t,l in zip(types, 'sd'): 67 | % for lname,name,method in rng_defs: 68 | public func ${lname}(_ dest:VectorP<${t}>, _ a: ${t}, _ b: ${t}) { 69 | _=${t}.rng${name}(${method}, stream.p, dest.c, dest.p, a, b) 70 | } 71 | public func ${lname}(_ n:Int, _ a: ${t}, _ b: ${t})->VectorP<${t}> { 72 | let dest = VectorP<${t}>(n) 73 | ${lname}(dest, a, b) 74 | return dest 75 | } 76 | % end 77 | 78 | public func gaussianMulti(_ dest:VectorP<${t}>, _ means:Array<${t}>, _ stdevs:Array<${t}>) { 79 | _=${t}.rngGaussianMV(VSL_RNG_METHOD_GAUSSIAN_ICDF, stream.p, dest.count/means.count, 80 | dest.p, means.count, VSL_MATRIX_STORAGE_DIAGONAL, means, stdevs); 81 | } 82 | public func gaussianMulti(_ n:Int, _ means:Array<${t}>, _ stdevs:Array<${t}>)->VectorP<${t}> { 83 | let dest = VectorP<${t}>(n * means.count) 84 | gaussianMulti(dest, means, stdevs) 85 | return dest 86 | } 87 | % end # t,l 88 | 89 | % for n,m,a,t1,b,t2 in ri1: 90 | public func ${lower1(n)}(_ dest: inout Array, _ ${a}:${t1}, _ ${b}:${t2}) { 91 | viRng${n}(${m}, stream.p, numericCast(dest.count), &dest, ${a}, ${b}) 92 | } 93 | public func ${lower1(n)}(_ n:Int, _ ${a}:${t1}, _ ${b}:${t2})->Array { 94 | var res = Array(repeating:0, count:n) 95 | ${lower1(n)}(&res, ${a}, ${b}) 96 | return res 97 | } 98 | % end 99 | 100 | % for n,m,a in ri2: 101 | public func ${lower1(n)}(_ dest: inout Array, _ ${a}:Double) { 102 | viRng${n}(${m}, stream.p, numericCast(dest.count), &dest, ${a}) 103 | } 104 | public func ${lower1(n)}(_ n:Int, _ ${a}:Double)->Array { 105 | var res = Array(repeating:0, count:n) 106 | ${lower1(n)}(&res, ${a}) 107 | return res 108 | } 109 | % end 110 | } 111 | 112 | -------------------------------------------------------------------------------- /all_ipps.h: -------------------------------------------------------------------------------- 1 | IPPAPI(IppStatus, ippsCopy_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 2 | IPPAPI(IppStatus, ippsMove_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 3 | IPPAPI(IppStatus, ippsSet_32f, (Ipp32f val, Ipp32f* pDst, int len)) 4 | IPPAPI(IppStatus, ippsZero_32f, (Ipp32f* pDst, int len)) 5 | IPPAPI(IppStatus, ippsTriangle_32f, (Ipp32f* pDst, int len, Ipp32f magn, Ipp32f rFreq, Ipp32f asym, Ipp32f* pPhase)) 6 | IPPAPI(IppStatus, ippsVectorJaehne_32f, (Ipp32f* pDst, int len, Ipp32f magn)) 7 | IPPAPI(IppStatus, ippsVectorSlope_32f, (Ipp32f* pDst, int len, Ipp32f offset, Ipp32f slope)) 8 | IPPAPI(IppStatus, ippsAddProduct_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pSrcDst, int len)) 9 | IPPAPI(IppStatus, ippsSumLn_32f, (const Ipp32f* pSrc, int len, Ipp32f* pSum)) 10 | IPPAPI(IppStatus, ippsArctan_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 11 | IPPAPI(IppStatus, ippsNormalize_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f vSub, Ipp32f vDiv)) 12 | IPPAPI(IppStatus, ippsMagnitude_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int len)) 13 | IPPAPI(IppStatus, ippsPhase_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int len)) 14 | IPPAPI(IppStatus, ippsPowerSpectr_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int len)) 15 | IPPAPI(IppStatus, ippsThreshold_LT_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level)) 16 | IPPAPI(IppStatus, ippsThreshold_GT_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level)) 17 | IPPAPI(IppStatus, ippsThreshold_LTAbs_32f, (const Ipp32f* pSrc, Ipp32f *pDst, int len, Ipp32f level)) 18 | IPPAPI(IppStatus, ippsThreshold_GTAbs_32f, (const Ipp32f* pSrc, Ipp32f *pDst, int len, Ipp32f level)) 19 | IPPAPI(IppStatus, ippsThreshold_LTAbsVal_32f, (const Ipp32f* pSrc, Ipp32f *pDst, int len, Ipp32f level, Ipp32f value)) 20 | IPPAPI(IppStatus, ippsThreshold_LTVal_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level, Ipp32f value)) 21 | IPPAPI(IppStatus, ippsThreshold_GTVal_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level, Ipp32f value)) 22 | IPPAPI(IppStatus, ippsThreshold_LTValGTVal_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f levelLT, Ipp32f valueLT, Ipp32f levelGT, Ipp32f valueGT)) 23 | IPPAPI(IppStatus, ippsThreshold_LTInv_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level)) 24 | IPPAPI(IppStatus, ippsCartToPolar_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDstMagn, Ipp32f* pDstPhase, int len)) 25 | IPPAPI(IppStatus, ippsPolarToCart_32f, (const Ipp32f* pSrcMagn, const Ipp32f* pSrcPhase, Ipp32f* pDstRe, Ipp32f* pDstIm, int len)) 26 | IPPAPI(IppStatus, ippsFlip_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 27 | IPPAPI(IppStatus, ippsWinBartlett_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 28 | IPPAPI(IppStatus, ippsWinHann_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 29 | IPPAPI(IppStatus, ippsWinHamming_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 30 | IPPAPI(IppStatus, ippsWinBlackman_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f alpha)) 31 | IPPAPI(IppStatus, ippsWinBlackmanStd_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 32 | IPPAPI(IppStatus, ippsWinBlackmanOpt_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len)) 33 | IPPAPI(IppStatus, ippsWinKaiser_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f alpha)) 34 | IPPAPI(IppStatus, ippsMin_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin)) 35 | IPPAPI(IppStatus, ippsMax_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMax)) 36 | IPPAPI(IppStatus, ippsMinMax_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin, Ipp32f* pMax)) 37 | IPPAPI(IppStatus, ippsMinAbs_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMinAbs)) 38 | IPPAPI(IppStatus, ippsMaxAbs_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMaxAbs)) 39 | IPPAPI(IppStatus, ippsMinIndx_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin, int* pIndx)) 40 | IPPAPI(IppStatus, ippsMaxIndx_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMax, int* pIndx)) 41 | IPPAPI(IppStatus, ippsMinMaxIndx_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin, int* pMinIndx, Ipp32f* pMax, int* pMaxIndx)) 42 | IPPAPI(IppStatus, ippsMean_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMean, IppHintAlgorithm hint)) 43 | IPPAPI(IppStatus, ippsStdDev_32f, (const Ipp32f* pSrc, int len, Ipp32f* pStdDev, IppHintAlgorithm hint)) 44 | IPPAPI(IppStatus, ippsMeanStdDev_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMean, Ipp32f* pStdDev, IppHintAlgorithm hint)) 45 | IPPAPI(IppStatus, ippsNorm_Inf_32f, (const Ipp32f* pSrc, int len, Ipp32f* pNorm)) 46 | IPPAPI(IppStatus, ippsNorm_L1_32f, (const Ipp32f* pSrc, int len, Ipp32f* pNorm)) 47 | IPPAPI(IppStatus, ippsNorm_L2_32f, (const Ipp32f* pSrc, int len, Ipp32f* pNorm)) 48 | IPPAPI(IppStatus, ippsNormDiff_Inf_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm)) 49 | IPPAPI(IppStatus, ippsNormDiff_L1_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm)) 50 | IPPAPI(IppStatus, ippsNormDiff_L2_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm)) 51 | IPPAPI(IppStatus, ippsDotProd_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pDp)) 52 | IPPAPI(IppStatus, ippsMinEvery_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, Ipp32u len)) 53 | IPPAPI(IppStatus, ippsMaxEvery_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, Ipp32u len)) 54 | IPPAPI(IppStatus, ippsMaxOrder_32f, (const Ipp32f* pSrc, int len, int* pOrder)) 55 | IPPAPI(IppStatus, ippsSampleUp_32f, (const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int* pDstLen, int factor, int* pPhase)) 56 | IPPAPI(IppStatus, ippsSampleDown_32f, (const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int* pDstLen, int factor, int* pPhase)) 57 | IPPAPI(IppStatus, ippsFilterMedian_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, int maskSize, const Ipp32f *pDlySrc, Ipp32f *pDlyDst, Ipp8u *pBuffer)) 58 | -------------------------------------------------------------------------------- /Tests/SwiftyMKLTests/SwiftyMKLTests.swift.gyb: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import BaseMath 3 | @testable import SwiftyMKL 4 | 5 | protocol TestProtocol { 6 | associatedtype T:Vector 7 | typealias E=T.Element 8 | var v1:T {get} 9 | var v2:T {get} 10 | var rng:RandDistrib {get} 11 | var z:E {get} 12 | } 13 | 14 | % for t in ('Float', 'Double'): 15 | % for s in ('VectorP', 'Array'): 16 | class SwiftyMKLTests${s}${t}: XCTestCase,TestProtocol { 17 | typealias T=${s}<${t}> 18 | override class func setUp() { 19 | super.setUp() 20 | IPP.setup() 21 | } 22 | 23 | let v1:T = [1.0, -2, 3, 0] 24 | let v2:T = [0.5, 12, -2, 1] 25 | let rng = RandDistrib() 26 | let z:E = 0.0 27 | } 28 | % end 29 | % end 30 | 31 | extension TestProtocol { 32 | func testVersion() { 33 | XCTAssertNotNil(MKL.get_version_string().range(of:"Intel")) 34 | XCTAssertGreaterThan(IPP.getLibVersion().major, 2012, "IPP Version too old or missing") 35 | } 36 | 37 | func testSum() { 38 | let exp = v1.reduce(z, +) 39 | XCTAssertEqual(v1.sum(), exp) 40 | } 41 | 42 | func testDot() { 43 | let exp = zip(v1,v2).map(*).reduce(z, +) 44 | let r1 = v1.dot(v2) 45 | XCTAssertEqual(r1, exp) 46 | } 47 | 48 | func testAbs() { 49 | let exp = T(v1.map {abs($0)}) 50 | let r1 = v1.abs() 51 | XCTAssertEqual(r1, exp) 52 | let r2 = v1.copy() 53 | v1.abs(r2) 54 | XCTAssertEqual(r2, exp) 55 | v1.abs_() 56 | XCTAssertEqual(v1, exp) 57 | } 58 | 59 | func testASum() { 60 | let exp = v1.reduce(z) {$0 + abs($1)} 61 | XCTAssertEqual(v1.asum(), exp) 62 | let exp2 = v1.abs().reduce(z, +) 63 | XCTAssertEqual(v1.asum(), exp2) 64 | } 65 | 66 | func testAdd() { 67 | let exp = T(zip(v1,v2).map(+)) 68 | let r1 = v1.add(v2) 69 | XCTAssertEqual(r1, exp, "add(v2)") 70 | let r2 = v1.copy() 71 | v1.add(v2, r2) 72 | XCTAssertEqual(r2, exp, "add(v2,r2)") 73 | let r3 = v1 + v2 74 | XCTAssertEqual(r3, exp, "+") 75 | let r4 = v1.copy() 76 | r4.add_(v2) 77 | XCTAssertEqual(r4, exp, "add_") 78 | let r5 = v1.copy() 79 | r5 += v2 80 | XCTAssertEqual(r5, exp, "+=") 81 | } 82 | 83 | func testDiv() { 84 | let v:E = 2.0 85 | let exp = T(v1.map {$0/v}) 86 | let r1 = v1.div(v) 87 | XCTAssertEqual(r1, exp) 88 | let r2 = v1.copy() 89 | v1.div(v, r2) 90 | XCTAssertEqual(r2, exp) 91 | let r3 = v1 / v 92 | XCTAssertEqual(r3, exp) 93 | let r4 = v1.copy() 94 | r4.div_(v) 95 | XCTAssertEqual(r4, exp) 96 | let r5 = v1.copy() 97 | r5 /= v 98 | XCTAssertEqual(r5, exp) 99 | } 100 | 101 | func testSubRev() { 102 | let v:E = 2.0 103 | let exp = T(v1.map {v-$0}) 104 | let r1 = v1.subRev(v) 105 | XCTAssertEqual(r1, exp) 106 | let r2 = v1.copy() 107 | v1.subRev(v, r2) 108 | XCTAssertEqual(r2, exp) 109 | let r3 = v - v1 110 | XCTAssertEqual(r3, exp) 111 | let r4 = v1.copy() 112 | r4.subRev_(v) 113 | XCTAssertEqual(r4, exp) 114 | } 115 | 116 | 117 | func testPowx() { 118 | let exp = T(v1.map {$0.pow(2.0)}) 119 | let r1 = v1.powx(2.0) 120 | XCTAssertEqual(r1, exp) 121 | let r2 = v1.copy() 122 | v1.powx(2.0, r2) 123 | XCTAssertEqual(r2, exp) 124 | v1.powx_(2.0) 125 | XCTAssertEqual(v1, exp) 126 | } 127 | 128 | func testPow() { 129 | let exp = T(zip(v1,v2).map({$0.pow($1)})) 130 | let r1 = v1.pow(v2) 131 | XCTAssertEqual(r1, exp) 132 | let r2 = v1.copy() 133 | v1.pow(v2, r2) 134 | XCTAssertEqual(r2, exp) 135 | v1.pow_(v2) 136 | XCTAssertEqual(v1, exp) 137 | } 138 | 139 | func testNormDiff_Inf() { 140 | let exp = zip(v1,v2).map({abs($0-$1)}).reduce(z, {$0.max($1)}) 141 | let r1 = v1.normDiff_Inf(v2) 142 | XCTAssertEqual(r1, exp) 143 | } 144 | 145 | func testPackIncrement() { 146 | let r1 = v1.packIncrement(2, 0, 2) 147 | XCTAssertEqual(r1.count, 2) 148 | XCTAssertEqual(r1[0], v1[0]) 149 | XCTAssertEqual(r1[1], v1[2]) 150 | } 151 | 152 | func testPackIndices() { 153 | let r1 = v1.packIndices([1,2]) 154 | XCTAssertEqual(r1.count, 2) 155 | XCTAssertEqual(r1[0], v1[1]) 156 | XCTAssertEqual(r1[1], v1[2]) 157 | } 158 | 159 | func testPackMasked() { 160 | let r1 = v1.packMasked([1,0,0,1]) 161 | XCTAssertEqual(r1.count, 2) 162 | XCTAssertEqual(r1[0], v1[0]) 163 | XCTAssertEqual(r1[1], v1[3]) 164 | 165 | let r2 = v1.packMasked([0,0,0,1]) 166 | XCTAssertEqual(r2.count, 1) 167 | XCTAssertEqual(r2[0], v1[3]) 168 | } 169 | 170 | func testZero() { 171 | let r1 = v1.copy() 172 | XCTAssertEqual(r1, v1) 173 | r1.zero() 174 | XCTAssertEqual(r1, v1*z) 175 | } 176 | 177 | func testSet() { 178 | let r1 = v1.copy() 179 | r1.set(2.0) 180 | XCTAssertEqual(r1, v1*z+2.0) 181 | } 182 | 183 | func testMove() { 184 | let r1 = v1.copy() 185 | v2.move(r1, 2) 186 | XCTAssertEqual(r1, T([v2[0],v2[1],v1[2],v1[3]])) 187 | let r2 = v1.copy() 188 | r2.move(r2, 2, fromIdx:1, toIdx:2) 189 | XCTAssertEqual(r2, T([v1[0],v1[1],v1[1],v1[2]])) 190 | } 191 | 192 | func testGaussian() { 193 | let r1 = rng.gaussian(1000, 5.0, 2.0) 194 | XCTAssertEqual(r1.count, 1000) 195 | XCTAssertGreaterThan(r1.mean(), 4) 196 | XCTAssertLessThan(r1.mean(), 6) 197 | XCTAssertGreaterThan(r1.stdDev(), 1) 198 | XCTAssertLessThan(r1.stdDev(), 3) 199 | } 200 | 201 | func testGaussianMulti1() { 202 | let r1 = rng.gaussianMulti(1000, [5.0], [2.0]); 203 | XCTAssertEqual(r1.count, 1000) 204 | XCTAssertGreaterThan(r1.mean(), 4) 205 | XCTAssertLessThan(r1.mean(), 6) 206 | XCTAssertGreaterThan(r1.stdDev(), 1) 207 | XCTAssertLessThan(r1.stdDev(), 3) 208 | } 209 | 210 | func testGaussianMulti2() { 211 | let r1 = rng.gaussianMulti(1000, [5.0,-5.0], [2.0,1.0]); 212 | XCTAssertEqual(r1.count, 2000) 213 | 214 | let r2 = r1.packIncrement(2, 0, 1000) 215 | XCTAssertGreaterThan(r2.mean(), 4) 216 | XCTAssertLessThan(r2.mean(), 6) 217 | XCTAssertGreaterThan(r2.stdDev(), 1) 218 | XCTAssertLessThan(r2.stdDev(), 3) 219 | 220 | let r3 = r1.packIncrement(2, 1, 1000) 221 | XCTAssertGreaterThan(r3.mean(), -6) 222 | XCTAssertLessThan(r3.mean(), -4) 223 | XCTAssertLessThan(r3.stdDev(), 2) 224 | } 225 | 226 | } 227 | 228 | -------------------------------------------------------------------------------- /all_vml.h: -------------------------------------------------------------------------------- 1 | _Mkl_Api(void,vsAbs,(const MKL_INT n, const float a[], float r[])) 2 | _Mkl_Api(void,vsInv,(const MKL_INT n, const float a[], float r[])) 3 | _Mkl_Api(void,vsSqrt,(const MKL_INT n, const float a[], float r[])) 4 | _Mkl_Api(void,vsInvSqrt,(const MKL_INT n, const float a[], float r[])) 5 | _Mkl_Api(void,vsCbrt,(const MKL_INT n, const float a[], float r[])) 6 | _Mkl_Api(void,vsInvCbrt,(const MKL_INT n, const float a[], float r[])) 7 | _Mkl_Api(void,vsSqr,(const MKL_INT n, const float a[], float r[])) 8 | _Mkl_Api(void,vsExp,(const MKL_INT n, const float a[], float r[])) 9 | _Mkl_Api(void, vsExp2, (const MKL_INT n, const float a[], float r[])) 10 | _Mkl_Api(void, vsExp10, (const MKL_INT n, const float a[], float r[])) 11 | _Mkl_Api(void,vsExpm1,(const MKL_INT n, const float a[], float r[])) 12 | _Mkl_Api(void,vsLn,(const MKL_INT n, const float a[], float r[])) 13 | _Mkl_Api(void, vsLog2, (const MKL_INT n, const float a[], float r[])) 14 | _Mkl_Api(void,vsLog10,(const MKL_INT n, const float a[], float r[])) 15 | _Mkl_Api(void,vsLog1p,(const MKL_INT n, const float a[], float r[])) 16 | _Mkl_Api(void, vsLogb, (const MKL_INT n, const float a[], float r[])) 17 | _Mkl_Api(void,vsCos,(const MKL_INT n, const float a[], float r[])) 18 | _Mkl_Api(void,vsSin,(const MKL_INT n, const float a[], float r[])) 19 | _Mkl_Api(void,vsTan,(const MKL_INT n, const float a[], float r[])) 20 | _Mkl_Api(void, vsCospi, (const MKL_INT n, const float a[], float r[])) 21 | _Mkl_Api(void, vsSinpi, (const MKL_INT n, const float a[], float r[])) 22 | _Mkl_Api(void, vsTanpi, (const MKL_INT n, const float a[], float r[])) 23 | _Mkl_Api(void, vsCosd, (const MKL_INT n, const float a[], float r[])) 24 | _Mkl_Api(void, vsSind, (const MKL_INT n, const float a[], float r[])) 25 | _Mkl_Api(void, vsTand, (const MKL_INT n, const float a[], float r[])) 26 | _Mkl_Api(void,vsCosh,(const MKL_INT n, const float a[], float r[])) 27 | _Mkl_Api(void,vsSinh,(const MKL_INT n, const float a[], float r[])) 28 | _Mkl_Api(void,vsTanh,(const MKL_INT n, const float a[], float r[])) 29 | _Mkl_Api(void,vsAcos,(const MKL_INT n, const float a[], float r[])) 30 | _Mkl_Api(void,vsAsin,(const MKL_INT n, const float a[], float r[])) 31 | _Mkl_Api(void,vsAtan,(const MKL_INT n, const float a[], float r[])) 32 | _Mkl_Api(void, vsAcospi, (const MKL_INT n, const float a[], float r[])) 33 | _Mkl_Api(void, vsAsinpi, (const MKL_INT n, const float a[], float r[])) 34 | _Mkl_Api(void, vsAtanpi, (const MKL_INT n, const float a[], float r[])) 35 | _Mkl_Api(void,vsAcosh,(const MKL_INT n, const float a[], float r[])) 36 | _Mkl_Api(void,vsAsinh,(const MKL_INT n, const float a[], float r[])) 37 | _Mkl_Api(void,vsAtanh,(const MKL_INT n, const float a[], float r[])) 38 | _Mkl_Api(void,vsErf,(const MKL_INT n, const float a[], float r[])) 39 | _Mkl_Api(void,vsErfInv,(const MKL_INT n, const float a[], float r[])) 40 | _Mkl_Api(void,vsHypot,(const MKL_INT n, const float a[], const float b[], float r[])) 41 | _Mkl_Api(void,vsErfc,(const MKL_INT n, const float a[], float r[])) 42 | _Mkl_Api(void,vsErfcInv,(const MKL_INT n, const float a[], float r[])) 43 | _Mkl_Api(void,vsCdfNorm,(const MKL_INT n, const float a[], float r[])) 44 | _Mkl_Api(void,vsCdfNormInv,(const MKL_INT n, const float a[], float r[])) 45 | _Mkl_Api(void,vsLGamma,(const MKL_INT n, const float a[], float r[])) 46 | _Mkl_Api(void,vsTGamma,(const MKL_INT n, const float a[], float r[])) 47 | _Mkl_Api(void,vsAtan2,(const MKL_INT n, const float a[], const float b[], float r[])) 48 | _Mkl_Api(void, vsAtan2pi, (const MKL_INT n, const float a[], const float b[], float r[])) 49 | _Mkl_Api(void,vsPow,(const MKL_INT n, const float a[], const float b[], float r[])) 50 | _Mkl_Api(void,vsPow3o2,(const MKL_INT n, const float a[], float r[])) 51 | _Mkl_Api(void,vsPow2o3,(const MKL_INT n, const float a[], float r[])) 52 | _Mkl_Api(void,vsPowx,(const MKL_INT n, const float a[], const float b, float r[])) 53 | _Mkl_Api(void, vsPowr, (const MKL_INT n, const float a[], const float b[], float r[])) 54 | _Mkl_Api(void,vsSinCos,(const MKL_INT n, const float a[], float r1[], float r2[])) 55 | _Mkl_Api(void,vsLinearFrac,(const MKL_INT n, const float a[], const float b[], const float scalea, const float shifta, const float scaleb, const float shiftb, float r[])) 56 | _Mkl_Api(void,vsCeil,(const MKL_INT n, const float a[], float r[])) 57 | _Mkl_Api(void,vsFloor,(const MKL_INT n, const float a[], float r[])) 58 | _Mkl_Api(void,vsFrac,(const MKL_INT n, const float a[], float r[])) 59 | _Mkl_Api(void,vsModf,(const MKL_INT n, const float a[], float r1[], float r2[])) 60 | _Mkl_Api(void, vsFmod, (const MKL_INT n, const float a[], float r1[], float r2[])) 61 | _Mkl_Api(void, vsRemainder, (const MKL_INT n, const float a[], float r1[], float r2[])) 62 | _Mkl_Api(void, vsNextAfter, (const MKL_INT n, const float a[], float r1[], float r2[])) 63 | _Mkl_Api(void, vsCopySign, (const MKL_INT n, const float a[], float r1[], float r2[])) 64 | _Mkl_Api(void, vsFdim, (const MKL_INT n, const float a[], float r1[], float r2[])) 65 | _Mkl_Api(void, vsFmax, (const MKL_INT n, const float a[], float r1[], float r2[])) 66 | _Mkl_Api(void, vsFmin, (const MKL_INT n, const float a[], float r1[], float r2[])) 67 | _Mkl_Api(void, vsMaxMag, (const MKL_INT n, const float a[], float r1[], float r2[])) 68 | _Mkl_Api(void, vsMinMag, (const MKL_INT n, const float a[], float r1[], float r2[])) 69 | _Mkl_Api(void,vsNearbyInt,(const MKL_INT n, const float a[], float r[])) 70 | _Mkl_Api(void,vsRint,(const MKL_INT n, const float a[], float r[])) 71 | _Mkl_Api(void,vsRound,(const MKL_INT n, const float a[], float r[])) 72 | _Mkl_Api(void,vsTrunc,(const MKL_INT n, const float a[], float r[])) 73 | _Mkl_Api(void, vsExpInt1, (const MKL_INT n, const float a[], float r[])) 74 | _Mkl_Api(void,vsPackI,(const MKL_INT n, const float a[], const MKL_INT incra, float y[])) 75 | _Mkl_Api(void,vsPackV,(const MKL_INT n, const float a[], const MKL_INT ia[], float y[])) 76 | _Mkl_Api(void,vsPackM,(const MKL_INT n, const float a[], const MKL_INT ma[], float y[])) 77 | _Mkl_Api(void,vsUnpackI,(const MKL_INT n, const float a[], float y[], const MKL_INT incry )) 78 | _Mkl_Api(void,vsUnpackV,(const MKL_INT n, const float a[], float y[], const MKL_INT iy[] )) 79 | _Mkl_Api(void,vsUnpackM,(const MKL_INT n, const float a[], float y[], const MKL_INT my[] )) 80 | -------------------------------------------------------------------------------- /custom/vml_vsl_list: -------------------------------------------------------------------------------- 1 | vmsCeil 2 | vsCeil 3 | vmsFloor 4 | vsFloor 5 | vmsNearbyInt 6 | vsNearbyInt 7 | vmsRint 8 | vsRint 9 | vmsRound 10 | vsRound 11 | vmsTrunc 12 | vsTrunc 13 | vmsAbs 14 | vsAbs 15 | vmsInv 16 | vsInv 17 | vmsSqrt 18 | vsSqrt 19 | vmsInvSqrt 20 | vsInvSqrt 21 | vmsCbrt 22 | vsCbrt 23 | vmsInvCbrt 24 | vsInvCbrt 25 | vmsExp 26 | vsExp 27 | vmsLn 28 | vsLn 29 | vmsLog10 30 | vsLog10 31 | vmsCos 32 | vsCos 33 | vmsSin 34 | vsSin 35 | vmsTan 36 | vsTan 37 | vmsAcos 38 | vsAcos 39 | vmsAcosh 40 | vsAcosh 41 | vmsAsin 42 | vsAsin 43 | vmsAsinh 44 | vsAsinh 45 | vmsAtan 46 | vsAtan 47 | vmsAtanh 48 | vsAtanh 49 | vmsCosh 50 | vsCosh 51 | vmsSinh 52 | vsSinh 53 | vmsTanh 54 | vsTanh 55 | vmsErf 56 | vsErf 57 | vmsErfc 58 | vsErfc 59 | vmsErfInv 60 | vsErfInv 61 | vmsSqr 62 | vsSqr 63 | vmsExpm1 64 | vsExpm1 65 | vmsLog1p 66 | vsLog1p 67 | vmsPow3o2 68 | vsPow3o2 69 | vmsPow2o3 70 | vsPow2o3 71 | vmsErfcInv 72 | vsErfcInv 73 | vmsCdfNorm 74 | vsCdfNorm 75 | vmsCdfNormInv 76 | vsCdfNormInv 77 | vmsLGamma 78 | vsLGamma 79 | vmsTGamma 80 | vsTGamma 81 | vdCeil 82 | vmdCeil 83 | vdFloor 84 | vmdFloor 85 | vdNearbyInt 86 | vmdNearbyInt 87 | vdRint 88 | vmdRint 89 | vdRound 90 | vmdRound 91 | vdTrunc 92 | vmdTrunc 93 | vdAbs 94 | vmdAbs 95 | vdInv 96 | vmdInv 97 | vdSqrt 98 | vmdSqrt 99 | vdInvSqrt 100 | vmdInvSqrt 101 | vdCbrt 102 | vmdCbrt 103 | vdInvCbrt 104 | vmdInvCbrt 105 | vdExp 106 | vmdExp 107 | vdLn 108 | vmdLn 109 | vdLog10 110 | vmdLog10 111 | vdCos 112 | vmdCos 113 | vdSin 114 | vmdSin 115 | vdTan 116 | vmdTan 117 | vdAcos 118 | vmdAcos 119 | vdAcosh 120 | vmdAcosh 121 | vdAsin 122 | vmdAsin 123 | vdAsinh 124 | vmdAsinh 125 | vdAtan 126 | vmdAtan 127 | vdAtanh 128 | vmdAtanh 129 | vdCosh 130 | vmdCosh 131 | vdSinh 132 | vmdSinh 133 | vdTanh 134 | vmdTanh 135 | vdErf 136 | vmdErf 137 | vdErfc 138 | vmdErfc 139 | vdErfInv 140 | vmdErfInv 141 | vdSqr 142 | vmdSqr 143 | vdExpm1 144 | vmdExpm1 145 | vdLog1p 146 | vmdLog1p 147 | vdPow3o2 148 | vmdPow3o2 149 | vdPow2o3 150 | vmdPow2o3 151 | vdErfcInv 152 | vmdErfcInv 153 | vdCdfNorm 154 | vmdCdfNorm 155 | vdCdfNormInv 156 | vmdCdfNormInv 157 | vdLGamma 158 | vmdLGamma 159 | vdTGamma 160 | vmdTGamma 161 | vcCos 162 | vmcCos 163 | vcSin 164 | vmcSin 165 | vcTan 166 | vmcTan 167 | vcCosh 168 | vmcCosh 169 | vcSinh 170 | vmcSinh 171 | vcTanh 172 | vmcTanh 173 | vcAcos 174 | vmcAcos 175 | vcAsin 176 | vmcAsin 177 | vcAtan 178 | vmcAtan 179 | vcAcosh 180 | vmcAcosh 181 | vcAsinh 182 | vmcAsinh 183 | vcAtanh 184 | vmcAtanh 185 | vcExp 186 | vmcExp 187 | vcLn 188 | vmcLn 189 | vcLog10 190 | vmcLog10 191 | vcSqrt 192 | vmcSqrt 193 | vcConj 194 | vmcConj 195 | vmzCos 196 | vzCos 197 | vmzSin 198 | vzSin 199 | vmzTan 200 | vzTan 201 | vmzCosh 202 | vzCosh 203 | vmzSinh 204 | vzSinh 205 | vmzTanh 206 | vzTanh 207 | vmzAcos 208 | vzAcos 209 | vmzAsin 210 | vzAsin 211 | vmzAtan 212 | vzAtan 213 | vmzAcosh 214 | vzAcosh 215 | vmzAsinh 216 | vzAsinh 217 | vmzAtanh 218 | vzAtanh 219 | vmzExp 220 | vzExp 221 | vmzLn 222 | vzLn 223 | vmzLog10 224 | vzLog10 225 | vmzSqrt 226 | vzSqrt 227 | vmzConj 228 | vzConj 229 | vcCIS 230 | vmcCIS 231 | vmzCIS 232 | vzCIS 233 | vcAbs 234 | vmcAbs 235 | vcArg 236 | vmcArg 237 | vmzAbs 238 | vzAbs 239 | vmzArg 240 | vzArg 241 | vmsDiv 242 | vsDiv 243 | vmsPow 244 | vsPow 245 | vmsAtan2 246 | vsAtan2 247 | vmsHypot 248 | vsHypot 249 | vmsAdd 250 | vsAdd 251 | vmsSub 252 | vsSub 253 | vmsMul 254 | vsMul 255 | vdDiv 256 | vmdDiv 257 | vdPow 258 | vmdPow 259 | vdAtan2 260 | vmdAtan2 261 | vdHypot 262 | vmdHypot 263 | vdAdd 264 | vmdAdd 265 | vdSub 266 | vmdSub 267 | vdMul 268 | vmdMul 269 | vcDiv 270 | vmcDiv 271 | vcPow 272 | vmcPow 273 | vcAdd 274 | vmcAdd 275 | vcSub 276 | vmcSub 277 | vcMul 278 | vmcMul 279 | vcMulByConj 280 | vmcMulByConj 281 | vmzDiv 282 | vzDiv 283 | vmzPow 284 | vzPow 285 | vmzAdd 286 | vzAdd 287 | vmzSub 288 | vzSub 289 | vmzMul 290 | vzMul 291 | vmzMulByConj 292 | vzMulByConj 293 | vcPowx 294 | vmcPowx 295 | vmzPowx 296 | vzPowx 297 | vmsPowx 298 | vsPowx 299 | vdPowx 300 | vmdPowx 301 | vmsSinCos 302 | vsSinCos 303 | vmsModf 304 | vsModf 305 | vdSinCos 306 | vmdSinCos 307 | vdModf 308 | vmdModf 309 | vmsLinearFrac 310 | vsLinearFrac 311 | vdLinearFrac 312 | vmdLinearFrac 313 | vmsPackI 314 | vsPackI 315 | vdPackI 316 | vmdPackI 317 | vcPackI 318 | vmcPackI 319 | vmzPackI 320 | vzPackI 321 | vmsPackM 322 | vsPackM 323 | vdPackM 324 | vmdPackM 325 | vcPackM 326 | vmcPackM 327 | vmzPackM 328 | vzPackM 329 | vmsPackV 330 | vsPackV 331 | vdPackV 332 | vmdPackV 333 | vcPackV 334 | vmcPackV 335 | vmzPackV 336 | vzPackV 337 | vmsUnpackI 338 | vsUnpackI 339 | vdUnpackI 340 | vmdUnpackI 341 | vcUnpackI 342 | vmcUnpackI 343 | vmzUnpackI 344 | vzUnpackI 345 | vmsUnpackM 346 | vsUnpackM 347 | vdUnpackM 348 | vmdUnpackM 349 | vcUnpackM 350 | vmcUnpackM 351 | vmzUnpackM 352 | vzUnpackM 353 | vmsUnpackV 354 | vsUnpackV 355 | vdUnpackV 356 | vmdUnpackV 357 | vcUnpackV 358 | vmcUnpackV 359 | vmzUnpackV 360 | vzUnpackV 361 | vmlClearErrStatus 362 | vmlClearErrorCallBack 363 | vmlGetErrStatus 364 | vmlGetErrorCallBack 365 | vmlSetErrStatus 366 | vmlSetErrorCallBack 367 | vmlGetMode 368 | vmlSetMode 369 | vdRngCauchy 370 | vsRngCauchy 371 | vdRngExponential 372 | vsRngExponential 373 | vdRngGaussian 374 | vsRngGaussian 375 | vdRngGaussianMV 376 | vsRngGaussianMV 377 | vdRngGumbel 378 | vsRngGumbel 379 | vdRngLaplace 380 | vsRngLaplace 381 | vdRngLognormal 382 | vsRngLognormal 383 | vdRngRayleigh 384 | vsRngRayleigh 385 | vdRngUniform 386 | vsRngUniform 387 | vdRngWeibull 388 | vsRngWeibull 389 | vdRngBeta 390 | vsRngBeta 391 | vdRngGamma 392 | vsRngGamma 393 | viRngBernoulli 394 | viRngBinomial 395 | viRngGeometric 396 | viRngHypergeometric 397 | viRngNegBinomial 398 | viRngNegbinomial 399 | viRngPoisson 400 | viRngPoissonV 401 | viRngUniform 402 | viRngUniformBits 403 | viRngUniformBits32 404 | viRngUniformBits64 405 | vslCopyStream 406 | vslCopyStreamState 407 | vslDeleteStream 408 | vslGetStreamStateBrng 409 | vslLeapfrogStream 410 | vslNewStream 411 | vslNewStreamEx 412 | vslSkipAheadStream 413 | vsldNewAbstractStream 414 | vsliNewAbstractStream 415 | vslsNewAbstractStream 416 | vslGetBrngProperties 417 | vslGetNumRegBrngs 418 | vslRegisterBrng 419 | vsldSSCompute 420 | vsldSSEditCovCor 421 | vsldSSEditMissingValues 422 | vsldSSEditMoments 423 | vsldSSEditCorParameterization 424 | vsldSSEditOutliersDetection 425 | vsldSSEditPooledCovariance 426 | vsldSSEditPartialCovCor 427 | vsldSSEditQuantiles 428 | vsldSSEditRobustCovariance 429 | vsldSSEditStreamQuantiles 430 | vsldSSEditTask 431 | vslSSDeleteTask 432 | vsldSSNewTask 433 | vsliSSEditTask 434 | vslsSSCompute 435 | vslsSSEditCovCor 436 | vslsSSEditMissingValues 437 | vslsSSEditMoments 438 | vslsSSEditCorParameterization 439 | vslsSSEditOutliersDetection 440 | vslsSSEditPooledCovariance 441 | vslsSSEditPartialCovCor 442 | vslsSSEditQuantiles 443 | vslsSSEditRobustCovariance 444 | vslsSSEditStreamQuantiles 445 | vslsSSEditTask 446 | vslsSSNewTask 447 | vslGetStreamSize 448 | vslLoadStreamF 449 | vslLoadStreamM 450 | vslSaveStreamF 451 | vslSaveStreamM 452 | -------------------------------------------------------------------------------- /Tests/SwiftyMKLTests/SwiftyMKLTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import BaseMath 3 | @testable import SwiftyMKL 4 | 5 | protocol TestProtocol { 6 | associatedtype T:Vector 7 | typealias E=T.Element 8 | var v1:T {get} 9 | var v2:T {get} 10 | var rng:RandDistrib {get} 11 | var z:E {get} 12 | } 13 | 14 | class SwiftyMKLTestsVectorPFloat: XCTestCase,TestProtocol { 15 | typealias T=VectorP 16 | override class func setUp() { 17 | super.setUp() 18 | IPP.setup() 19 | } 20 | 21 | let v1:T = [1.0, -2, 3, 0] 22 | let v2:T = [0.5, 12, -2, 1] 23 | let rng = RandDistrib() 24 | let z:E = 0.0 25 | } 26 | class SwiftyMKLTestsArrayFloat: XCTestCase,TestProtocol { 27 | typealias T=Array 28 | override class func setUp() { 29 | super.setUp() 30 | IPP.setup() 31 | } 32 | 33 | let v1:T = [1.0, -2, 3, 0] 34 | let v2:T = [0.5, 12, -2, 1] 35 | let rng = RandDistrib() 36 | let z:E = 0.0 37 | } 38 | class SwiftyMKLTestsVectorPDouble: XCTestCase,TestProtocol { 39 | typealias T=VectorP 40 | override class func setUp() { 41 | super.setUp() 42 | IPP.setup() 43 | } 44 | 45 | let v1:T = [1.0, -2, 3, 0] 46 | let v2:T = [0.5, 12, -2, 1] 47 | let rng = RandDistrib() 48 | let z:E = 0.0 49 | } 50 | class SwiftyMKLTestsArrayDouble: XCTestCase,TestProtocol { 51 | typealias T=Array 52 | override class func setUp() { 53 | super.setUp() 54 | IPP.setup() 55 | } 56 | 57 | let v1:T = [1.0, -2, 3, 0] 58 | let v2:T = [0.5, 12, -2, 1] 59 | let rng = RandDistrib() 60 | let z:E = 0.0 61 | } 62 | 63 | extension TestProtocol { 64 | func testVersion() { 65 | XCTAssertNotNil(MKL.get_version_string().range(of:"Intel")) 66 | XCTAssertGreaterThan(IPP.getLibVersion().major, 2012, "IPP Version too old or missing") 67 | } 68 | 69 | func testSum() { 70 | let exp = v1.reduce(z, +) 71 | XCTAssertEqual(v1.sum(), exp) 72 | } 73 | 74 | func testDot() { 75 | let exp = zip(v1,v2).map(*).reduce(z, +) 76 | let r1 = v1.dot(v2) 77 | XCTAssertEqual(r1, exp) 78 | } 79 | 80 | func testAbs() { 81 | let exp = T(v1.map {abs($0)}) 82 | let r1 = v1.abs() 83 | XCTAssertEqual(r1, exp) 84 | let r2 = v1.copy() 85 | v1.abs(r2) 86 | XCTAssertEqual(r2, exp) 87 | v1.abs_() 88 | XCTAssertEqual(v1, exp) 89 | } 90 | 91 | func testASum() { 92 | let exp = v1.reduce(z) {$0 + abs($1)} 93 | XCTAssertEqual(v1.asum(), exp) 94 | let exp2 = v1.abs().reduce(z, +) 95 | XCTAssertEqual(v1.asum(), exp2) 96 | } 97 | 98 | func testAdd() { 99 | let exp = T(zip(v1,v2).map(+)) 100 | let r1 = v1.add(v2) 101 | XCTAssertEqual(r1, exp, "add(v2)") 102 | let r2 = v1.copy() 103 | v1.add(v2, r2) 104 | XCTAssertEqual(r2, exp, "add(v2,r2)") 105 | let r3 = v1 + v2 106 | XCTAssertEqual(r3, exp, "+") 107 | let r4 = v1.copy() 108 | r4.add_(v2) 109 | XCTAssertEqual(r4, exp, "add_") 110 | let r5 = v1.copy() 111 | r5 += v2 112 | XCTAssertEqual(r5, exp, "+=") 113 | } 114 | 115 | func testDiv() { 116 | let v:E = 2.0 117 | let exp = T(v1.map {$0/v}) 118 | let r1 = v1.div(v) 119 | XCTAssertEqual(r1, exp) 120 | let r2 = v1.copy() 121 | v1.div(v, r2) 122 | XCTAssertEqual(r2, exp) 123 | let r3 = v1 / v 124 | XCTAssertEqual(r3, exp) 125 | let r4 = v1.copy() 126 | r4.div_(v) 127 | XCTAssertEqual(r4, exp) 128 | let r5 = v1.copy() 129 | r5 /= v 130 | XCTAssertEqual(r5, exp) 131 | } 132 | 133 | func testSubRev() { 134 | let v:E = 2.0 135 | let exp = T(v1.map {v-$0}) 136 | let r1 = v1.subRev(v) 137 | XCTAssertEqual(r1, exp) 138 | let r2 = v1.copy() 139 | v1.subRev(v, r2) 140 | XCTAssertEqual(r2, exp) 141 | let r3 = v - v1 142 | XCTAssertEqual(r3, exp) 143 | let r4 = v1.copy() 144 | r4.subRev_(v) 145 | XCTAssertEqual(r4, exp) 146 | } 147 | 148 | 149 | func testPowx() { 150 | let exp = T(v1.map {$0.pow(2.0)}) 151 | let r1 = v1.powx(2.0) 152 | XCTAssertEqual(r1, exp) 153 | let r2 = v1.copy() 154 | v1.powx(2.0, r2) 155 | XCTAssertEqual(r2, exp) 156 | v1.powx_(2.0) 157 | XCTAssertEqual(v1, exp) 158 | } 159 | 160 | func testPow() { 161 | let exp = T(zip(v1,v2).map({$0.pow($1)})) 162 | let r1 = v1.pow(v2) 163 | XCTAssertEqual(r1, exp) 164 | let r2 = v1.copy() 165 | v1.pow(v2, r2) 166 | XCTAssertEqual(r2, exp) 167 | v1.pow_(v2) 168 | XCTAssertEqual(v1, exp) 169 | } 170 | 171 | func testNormDiff_Inf() { 172 | let exp = zip(v1,v2).map({abs($0-$1)}).reduce(z, {$0.max($1)}) 173 | let r1 = v1.normDiff_Inf(v2) 174 | XCTAssertEqual(r1, exp) 175 | } 176 | 177 | func testPackIncrement() { 178 | let r1 = v1.packIncrement(2, 0, 2) 179 | XCTAssertEqual(r1.count, 2) 180 | XCTAssertEqual(r1[0], v1[0]) 181 | XCTAssertEqual(r1[1], v1[2]) 182 | } 183 | 184 | func testPackIndices() { 185 | let r1 = v1.packIndices([1,2]) 186 | XCTAssertEqual(r1.count, 2) 187 | XCTAssertEqual(r1[0], v1[1]) 188 | XCTAssertEqual(r1[1], v1[2]) 189 | } 190 | 191 | func testPackMasked() { 192 | let r1 = v1.packMasked([1,0,0,1]) 193 | XCTAssertEqual(r1.count, 2) 194 | XCTAssertEqual(r1[0], v1[0]) 195 | XCTAssertEqual(r1[1], v1[3]) 196 | 197 | let r2 = v1.packMasked([0,0,0,1]) 198 | XCTAssertEqual(r2.count, 1) 199 | XCTAssertEqual(r2[0], v1[3]) 200 | } 201 | 202 | func testZero() { 203 | let r1 = v1.copy() 204 | XCTAssertEqual(r1, v1) 205 | r1.zero() 206 | XCTAssertEqual(r1, v1*z) 207 | } 208 | 209 | func testSet() { 210 | let r1 = v1.copy() 211 | r1.set(2.0) 212 | XCTAssertEqual(r1, v1*z+2.0) 213 | } 214 | 215 | func testMove() { 216 | let r1 = v1.copy() 217 | v2.move(r1, 2) 218 | XCTAssertEqual(r1, T([v2[0],v2[1],v1[2],v1[3]])) 219 | let r2 = v1.copy() 220 | r2.move(r2, 2, fromIdx:1, toIdx:2) 221 | XCTAssertEqual(r2, T([v1[0],v1[1],v1[1],v1[2]])) 222 | } 223 | 224 | func testGaussian() { 225 | let r1 = rng.gaussian(1000, 5.0, 2.0) 226 | XCTAssertEqual(r1.count, 1000) 227 | XCTAssertGreaterThan(r1.mean(), 4) 228 | XCTAssertLessThan(r1.mean(), 6) 229 | XCTAssertGreaterThan(r1.stdDev(), 1) 230 | XCTAssertLessThan(r1.stdDev(), 3) 231 | } 232 | 233 | func testGaussianMulti1() { 234 | let r1 = rng.gaussianMulti(1000, [5.0], [2.0]); 235 | XCTAssertEqual(r1.count, 1000) 236 | XCTAssertGreaterThan(r1.mean(), 4) 237 | XCTAssertLessThan(r1.mean(), 6) 238 | XCTAssertGreaterThan(r1.stdDev(), 1) 239 | XCTAssertLessThan(r1.stdDev(), 3) 240 | } 241 | 242 | func testGaussianMulti2() { 243 | let r1 = rng.gaussianMulti(1000, [5.0,-5.0], [2.0,1.0]); 244 | XCTAssertEqual(r1.count, 2000) 245 | 246 | let r2 = r1.packIncrement(2, 0, 1000) 247 | XCTAssertGreaterThan(r2.mean(), 4) 248 | XCTAssertLessThan(r2.mean(), 6) 249 | XCTAssertGreaterThan(r2.stdDev(), 1) 250 | XCTAssertLessThan(r2.stdDev(), 3) 251 | 252 | let r3 = r1.packIncrement(2, 1, 1000) 253 | XCTAssertGreaterThan(r3.mean(), -6) 254 | XCTAssertLessThan(r3.mean(), -4) 255 | XCTAssertLessThan(r3.stdDev(), 2) 256 | } 257 | 258 | } 259 | 260 | -------------------------------------------------------------------------------- /all_cblas.h: -------------------------------------------------------------------------------- 1 | float cblas_sdot(const MKL_INT N, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY); 2 | float cblas_sdoti(const MKL_INT N, const float *X, const MKL_INT *indx, const float *Y); 3 | float cblas_snrm2(const MKL_INT N, const float *X, const MKL_INT incX); 4 | float cblas_sasum(const MKL_INT N, const float *X, const MKL_INT incX); 5 | void cblas_sswap(const MKL_INT N, float *X, const MKL_INT incX, float *Y, const MKL_INT incY); 6 | void cblas_scopy(const MKL_INT N, const float *X, const MKL_INT incX, float *Y, const MKL_INT incY); 7 | void cblas_saxpy(const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, float *Y, const MKL_INT incY); 8 | void cblas_saxpby(const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY); 9 | void cblas_saxpyi(const MKL_INT N, const float alpha, const float *X, const MKL_INT *indx, float *Y); 10 | void cblas_sgthr(const MKL_INT N, const float *Y, float *X, const MKL_INT *indx); 11 | void cblas_sgthrz(const MKL_INT N, float *Y, float *X, const MKL_INT *indx); 12 | void cblas_ssctr(const MKL_INT N, const float *X, const MKL_INT *indx, float *Y); 13 | void cblas_srotg(float *a, float *b, float *c, float *s); 14 | void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P); 15 | void cblas_srot(const MKL_INT N, float *X, const MKL_INT incX, float *Y, const MKL_INT incY, const float c, const float s); 16 | void cblas_sroti(const MKL_INT N, float *X, const MKL_INT *indx, float *Y, const float c, const float s); 17 | void cblas_srotm(const MKL_INT N, float *X, const MKL_INT incX, float *Y, const MKL_INT incY, const float *P); 18 | void cblas_sscal(const MKL_INT N, const float alpha, float *X, const MKL_INT incX); 19 | void cblas_sgemv(const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY); 20 | void cblas_sgbmv(const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const MKL_INT M, const MKL_INT N, const MKL_INT KL, const MKL_INT KU, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY); 21 | void cblas_strmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *A, const MKL_INT lda, float *X, const MKL_INT incX); 22 | void cblas_stbmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const MKL_INT K, const float *A, const MKL_INT lda, float *X, const MKL_INT incX); 23 | void cblas_stpmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *Ap, float *X, const MKL_INT incX); 24 | void cblas_strsv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *A, const MKL_INT lda, float *X, const MKL_INT incX); 25 | void cblas_stbsv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const MKL_INT K, const float *A, const MKL_INT lda, float *X, const MKL_INT incX); 26 | void cblas_stpsv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *Ap, float *X, const MKL_INT incX); 27 | void cblas_ssymv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY); 28 | void cblas_ssbmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY); 29 | void cblas_sspmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *Ap, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY); 30 | void cblas_sger(const CBLAS_LAYOUT Layout, const MKL_INT M, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY, float *A, const MKL_INT lda); 31 | void cblas_ssyr(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, float *A, const MKL_INT lda); 32 | void cblas_sspr(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, float *Ap); 33 | void cblas_ssyr2(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY, float *A, const MKL_INT lda); 34 | void cblas_sspr2(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY, float *A); 35 | void cblas_sgemm(const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const CBLAS_TRANSPOSE TransB, const MKL_INT M, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc); 36 | void cblas_sgemmt(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_TRANSPOSE TransB, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc); 37 | void cblas_ssymm(const CBLAS_LAYOUT Layout, const CBLAS_SIDE Side, const CBLAS_UPLO Uplo, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc); 38 | void cblas_ssyrk(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE Trans, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float beta, float *C, const MKL_INT ldc); 39 | void cblas_ssyr2k(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE Trans, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc); 40 | void cblas_strmm(const CBLAS_LAYOUT Layout, const CBLAS_SIDE Side, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, float *B, const MKL_INT ldb); 41 | void cblas_strsm(const CBLAS_LAYOUT Layout, const CBLAS_SIDE Side, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, float *B, const MKL_INT ldb); 42 | MKL_INT cblas_sgemm_pack_get_size(const CBLAS_IDENTIFIER identifier, const MKL_INT M, const MKL_INT N, const MKL_INT K); 43 | void cblas_sgemm_pack(const CBLAS_LAYOUT Layout, const CBLAS_IDENTIFIER identifier, const CBLAS_TRANSPOSE Trans, const MKL_INT M, const MKL_INT N, const MKL_INT K, const float alpha, const float *src, const MKL_INT ld, float *dest); 44 | void cblas_sgemm_compute(const CBLAS_LAYOUT Layout, const MKL_INT TransA, const MKL_INT TransB, const MKL_INT M, const MKL_INT N, const MKL_INT K, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc); 45 | void cblas_sgemm_free(float *dest); 46 | -------------------------------------------------------------------------------- /Sources/SwiftyMKL/RandDistrib.swift: -------------------------------------------------------------------------------- 1 | import BaseMath 2 | import CIPL 3 | 4 | // #defines from mkl_vsl_defines.h not auto-converted by swift 5 | let VSL_BRNG_INC:Int32 = 1< 27 | vslNewStream(&ptr, VSL_BRNG_SFMT19937, UInt32.random(in: 0.. = p 32 | vslDeleteStream(&ptr) 33 | } 34 | } 35 | 36 | 37 | struct RandDistrib { 38 | var stream = RandDistribStream() 39 | 40 | public func gaussian(_ dest:VectorP, _ a: Float, _ b: Float) { 41 | _=Float.rngGaussian(VSL_RNG_METHOD_GAUSSIANMV_ICDF, stream.p, dest.c, dest.p, a, b) 42 | } 43 | public func gaussian(_ n:Int, _ a: Float, _ b: Float)->VectorP { 44 | let dest = VectorP(n) 45 | gaussian(dest, a, b) 46 | return dest 47 | } 48 | public func uniform(_ dest:VectorP, _ a: Float, _ b: Float) { 49 | _=Float.rngUniform(VSL_RNG_METHOD_UNIFORM_STD, stream.p, dest.c, dest.p, a, b) 50 | } 51 | public func uniform(_ n:Int, _ a: Float, _ b: Float)->VectorP { 52 | let dest = VectorP(n) 53 | uniform(dest, a, b) 54 | return dest 55 | } 56 | public func exponential(_ dest:VectorP, _ a: Float, _ b: Float) { 57 | _=Float.rngExponential(VSL_RNG_METHOD_EXPONENTIAL_ICDF, stream.p, dest.c, dest.p, a, b) 58 | } 59 | public func exponential(_ n:Int, _ a: Float, _ b: Float)->VectorP { 60 | let dest = VectorP(n) 61 | exponential(dest, a, b) 62 | return dest 63 | } 64 | public func laplace(_ dest:VectorP, _ a: Float, _ b: Float) { 65 | _=Float.rngLaplace(VSL_RNG_METHOD_LAPLACE_ICDF, stream.p, dest.c, dest.p, a, b) 66 | } 67 | public func laplace(_ n:Int, _ a: Float, _ b: Float)->VectorP { 68 | let dest = VectorP(n) 69 | laplace(dest, a, b) 70 | return dest 71 | } 72 | public func cauchy(_ dest:VectorP, _ a: Float, _ b: Float) { 73 | _=Float.rngCauchy(VSL_RNG_METHOD_CAUCHY_ICDF, stream.p, dest.c, dest.p, a, b) 74 | } 75 | public func cauchy(_ n:Int, _ a: Float, _ b: Float)->VectorP { 76 | let dest = VectorP(n) 77 | cauchy(dest, a, b) 78 | return dest 79 | } 80 | public func rayleigh(_ dest:VectorP, _ a: Float, _ b: Float) { 81 | _=Float.rngRayleigh(VSL_RNG_METHOD_RAYLEIGH_ICDF, stream.p, dest.c, dest.p, a, b) 82 | } 83 | public func rayleigh(_ n:Int, _ a: Float, _ b: Float)->VectorP { 84 | let dest = VectorP(n) 85 | rayleigh(dest, a, b) 86 | return dest 87 | } 88 | public func gumbel(_ dest:VectorP, _ a: Float, _ b: Float) { 89 | _=Float.rngGumbel(VSL_RNG_METHOD_GUMBEL_ICDF, stream.p, dest.c, dest.p, a, b) 90 | } 91 | public func gumbel(_ n:Int, _ a: Float, _ b: Float)->VectorP { 92 | let dest = VectorP(n) 93 | gumbel(dest, a, b) 94 | return dest 95 | } 96 | 97 | public func gaussianMulti(_ dest:VectorP, _ means:Array, _ stdevs:Array) { 98 | _=Float.rngGaussianMV(VSL_RNG_METHOD_GAUSSIAN_ICDF, stream.p, dest.count/means.count, 99 | dest.p, means.count, VSL_MATRIX_STORAGE_DIAGONAL, means, stdevs); 100 | } 101 | public func gaussianMulti(_ n:Int, _ means:Array, _ stdevs:Array)->VectorP { 102 | let dest = VectorP(n * means.count) 103 | gaussianMulti(dest, means, stdevs) 104 | return dest 105 | } 106 | public func gaussian(_ dest:VectorP, _ a: Double, _ b: Double) { 107 | _=Double.rngGaussian(VSL_RNG_METHOD_GAUSSIANMV_ICDF, stream.p, dest.c, dest.p, a, b) 108 | } 109 | public func gaussian(_ n:Int, _ a: Double, _ b: Double)->VectorP { 110 | let dest = VectorP(n) 111 | gaussian(dest, a, b) 112 | return dest 113 | } 114 | public func uniform(_ dest:VectorP, _ a: Double, _ b: Double) { 115 | _=Double.rngUniform(VSL_RNG_METHOD_UNIFORM_STD, stream.p, dest.c, dest.p, a, b) 116 | } 117 | public func uniform(_ n:Int, _ a: Double, _ b: Double)->VectorP { 118 | let dest = VectorP(n) 119 | uniform(dest, a, b) 120 | return dest 121 | } 122 | public func exponential(_ dest:VectorP, _ a: Double, _ b: Double) { 123 | _=Double.rngExponential(VSL_RNG_METHOD_EXPONENTIAL_ICDF, stream.p, dest.c, dest.p, a, b) 124 | } 125 | public func exponential(_ n:Int, _ a: Double, _ b: Double)->VectorP { 126 | let dest = VectorP(n) 127 | exponential(dest, a, b) 128 | return dest 129 | } 130 | public func laplace(_ dest:VectorP, _ a: Double, _ b: Double) { 131 | _=Double.rngLaplace(VSL_RNG_METHOD_LAPLACE_ICDF, stream.p, dest.c, dest.p, a, b) 132 | } 133 | public func laplace(_ n:Int, _ a: Double, _ b: Double)->VectorP { 134 | let dest = VectorP(n) 135 | laplace(dest, a, b) 136 | return dest 137 | } 138 | public func cauchy(_ dest:VectorP, _ a: Double, _ b: Double) { 139 | _=Double.rngCauchy(VSL_RNG_METHOD_CAUCHY_ICDF, stream.p, dest.c, dest.p, a, b) 140 | } 141 | public func cauchy(_ n:Int, _ a: Double, _ b: Double)->VectorP { 142 | let dest = VectorP(n) 143 | cauchy(dest, a, b) 144 | return dest 145 | } 146 | public func rayleigh(_ dest:VectorP, _ a: Double, _ b: Double) { 147 | _=Double.rngRayleigh(VSL_RNG_METHOD_RAYLEIGH_ICDF, stream.p, dest.c, dest.p, a, b) 148 | } 149 | public func rayleigh(_ n:Int, _ a: Double, _ b: Double)->VectorP { 150 | let dest = VectorP(n) 151 | rayleigh(dest, a, b) 152 | return dest 153 | } 154 | public func gumbel(_ dest:VectorP, _ a: Double, _ b: Double) { 155 | _=Double.rngGumbel(VSL_RNG_METHOD_GUMBEL_ICDF, stream.p, dest.c, dest.p, a, b) 156 | } 157 | public func gumbel(_ n:Int, _ a: Double, _ b: Double)->VectorP { 158 | let dest = VectorP(n) 159 | gumbel(dest, a, b) 160 | return dest 161 | } 162 | 163 | public func gaussianMulti(_ dest:VectorP, _ means:Array, _ stdevs:Array) { 164 | _=Double.rngGaussianMV(VSL_RNG_METHOD_GAUSSIAN_ICDF, stream.p, dest.count/means.count, 165 | dest.p, means.count, VSL_MATRIX_STORAGE_DIAGONAL, means, stdevs); 166 | } 167 | public func gaussianMulti(_ n:Int, _ means:Array, _ stdevs:Array)->VectorP { 168 | let dest = VectorP(n * means.count) 169 | gaussianMulti(dest, means, stdevs) 170 | return dest 171 | } 172 | 173 | public func uniform(_ dest: inout Array, _ lowerinc:Int32, _ upperexc:Int32) { 174 | viRngUniform(VSL_RNG_METHOD_UNIFORM_STD, stream.p, numericCast(dest.count), &dest, lowerinc, upperexc) 175 | } 176 | public func uniform(_ n:Int, _ lowerinc:Int32, _ upperexc:Int32)->Array { 177 | var res = Array(repeating:0, count:n) 178 | uniform(&res, lowerinc, upperexc) 179 | return res 180 | } 181 | public func binomial(_ dest: inout Array, _ ntrial:Int32, _ p:Double) { 182 | viRngBinomial(VSL_RNG_METHOD_BINOMIAL_BTPE, stream.p, numericCast(dest.count), &dest, ntrial, p) 183 | } 184 | public func binomial(_ n:Int, _ ntrial:Int32, _ p:Double)->Array { 185 | var res = Array(repeating:0, count:n) 186 | binomial(&res, ntrial, p) 187 | return res 188 | } 189 | public func negBinomial(_ dest: inout Array, _ a:Double, _ p:Double) { 190 | viRngNegBinomial(VSL_RNG_METHOD_NEGBINOMIAL_NBAR, stream.p, numericCast(dest.count), &dest, a, p) 191 | } 192 | public func negBinomial(_ n:Int, _ a:Double, _ p:Double)->Array { 193 | var res = Array(repeating:0, count:n) 194 | negBinomial(&res, a, p) 195 | return res 196 | } 197 | 198 | public func bernoulli(_ dest: inout Array, _ p:Double) { 199 | viRngBernoulli(VSL_RNG_METHOD_BERNOULLI_ICDF, stream.p, numericCast(dest.count), &dest, p) 200 | } 201 | public func bernoulli(_ n:Int, _ p:Double)->Array { 202 | var res = Array(repeating:0, count:n) 203 | bernoulli(&res, p) 204 | return res 205 | } 206 | public func geometric(_ dest: inout Array, _ p:Double) { 207 | viRngGeometric(VSL_RNG_METHOD_GEOMETRIC_ICDF, stream.p, numericCast(dest.count), &dest, p) 208 | } 209 | public func geometric(_ n:Int, _ p:Double)->Array { 210 | var res = Array(repeating:0, count:n) 211 | geometric(&res, p) 212 | return res 213 | } 214 | public func poisson(_ dest: inout Array, _ lambda:Double) { 215 | viRngPoisson(VSL_RNG_METHOD_POISSON_PTPE, stream.p, numericCast(dest.count), &dest, lambda) 216 | } 217 | public func poisson(_ n:Int, _ lambda:Double)->Array { 218 | var res = Array(repeating:0, count:n) 219 | poisson(&res, lambda) 220 | return res 221 | } 222 | } 223 | 224 | -------------------------------------------------------------------------------- /funcs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Read MKL headers and convert them in to a form usable in Swift. 3 | Uses hacky regexes. Would be better if it used a real parser. 4 | To support new types, edit `type_replace` below. 5 | """ 6 | 7 | from pdb import set_trace 8 | from mkl_funcs import * 9 | import re 10 | 11 | def lower1(s): return s[:1].lower() + s[1:] 12 | 13 | typ_typs = (('Float', 's', '32'), ('Double', 'd', '64')) 14 | 15 | # _Mkl_Api(void,vsLog1p,(const MKL_INT n, const float a[], float r[])) 16 | vml1 = """Ln Abs Inv Sqr Exp Cos Sin Tan Erf Sqrt Cbrt Cosh Sinh Tanh Acos Asin Atan Erfc Ceil Rint Expm1 Log10 Log1p 17 | Acosh Asinh Atanh Floor Round Trunc ErfInv Pow3o2 Pow2o3 InvSqrt InvCbrt NearbyInt """.split() 18 | # _Mkl_Api(void,vsAtan2,(const MKL_INT n, const float a[], const float b[], float r[])) 19 | vml2 = "Pow Hypot Atan2".split() 20 | # float cblas_sasum(const MKL_INT N, const float *X, const MKL_INT incX) 21 | cblas1 = "asum nrm2 dot".split() 22 | # IPPAPI(IppStatus, ippsStdDev_32f, (const Ipp32f* pSrc, int len, Ipp32f* pStdDev, IppHintAlgorithm hint)) 23 | ipp1 = "Mean StdDev Max Min".split() 24 | # IPPAPI(IppStatus, ippsNormDiff_Inf_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm)) 25 | ipp3 = "NormDiff_Inf NormDiff_L1 NormDiff_L2".split() 26 | 27 | def word(name): return fr'(?P<{name}>[\w]+)' 28 | params_re = r'\((?P[^)]+)\)' 29 | func_re = word("f") 30 | ret_re = word("r") 31 | l_re = r'(?P[sd])' 32 | n_re = r'(?P32f|64f)' 33 | vml_re = re.compile(fr"_Mkl_Api\( *{ret_re}, *v{l_re}{func_re}, *{params_re}\)") 34 | cblas_re = re.compile(fr"{ret_re} cblas_{l_re}{func_re}{params_re}") 35 | ipp_re = re.compile(fr"IPPAPI\( *{ret_re}, *ipps{func_re}_{n_re}, *{params_re}\)") 36 | sm_re = re.compile(fr"IPPAPI\( *{ret_re}, *sm{func_re}_{n_re}, *{params_re}\)") 37 | 38 | param_re = re.compile(fr'(?Pconst *)?{word("t")} *(?P\*?) *{word("name")}(?P *\[\])?') 39 | 40 | type_replace = dict( 41 | MKL_INT='Int32', 42 | double='Double', float='Float', int='Int32', 43 | Ipp64f='Double', Ipp32f='Float', 44 | Ipp64s='Int64', Ipp32s='Int32', Ipp16s='Int16', Ipp8s ='Int8', 45 | Ipp64u='UInt64', Ipp32u='UInt32', Ipp16u='UInt16', Ipp8u ='UInt8', 46 | void='Void' 47 | ) 48 | no_replace = set("VSLStreamStatePtr CBLAS_LAYOUT CBLAS_TRANSPOSE CBLAS_UPLO CBLAS_DIAG CBLAS_SIDE CBLAS_IDENTIFIER IppHintAlgorithm".split()) 49 | use_int32 = set("method mstorage".split()) 50 | 51 | def c2swift(s): 52 | m = param_re.search(s) 53 | name = m.group('name') 54 | is_ptr = m.group('ptr') or m.group('arr') 55 | t = m.group('t') 56 | try: 57 | if t not in no_replace: t = type_replace[t] 58 | except: raise Exception(f"Type map missing '{t}' in:\n{s}") 59 | if is_ptr: 60 | if t=='Void': t = 'UnsafeRawPointer' 61 | elif t=='Float': t = f"{'PtrT' if m.group('const') else 'MutPtrT'}" 62 | else: t = f"{'UnsafePointer' if m.group('const') else 'UnsafeMutablePointer'}<{t}>" 63 | else: 64 | if t=='Float': t = "Element" 65 | elif t=='Int32' and (name not in use_int32): t = "Int" 66 | return [name,t] 67 | 68 | def vml_name(n,t='Float'): return f'v{"s" if t=="Float" else "d"}{n}' 69 | def cblas_name(n,t='Float'): return f'cblas_{"s" if t=="Float" else "d"}{n}' 70 | def ipp_name(n,t='Float'): return f'ipps{n}_{"32f" if t=="Float" else "64f"}' 71 | def sm_name(n,t='Float'): return f'sm{n}_{"float" if t=="Float" else "double"}' 72 | name_lu = dict(vml=vml_name, cblas=cblas_name, ipp=ipp_name, sm=sm_name) 73 | 74 | def get_call(n,ty): 75 | if n=='hint': return "ippAlgHintFast" 76 | if ty=='Int': return f"numericCast({n})" 77 | return n 78 | 79 | names_c = "N n len".split() # Int32 80 | names_p = "X a pSrc pSrc1 A".split() # PtrT 81 | names_d = "r pDst y".split() # MutPtrT (also can be p{Name}) 82 | 83 | class MklHeader(): 84 | def __init__(self,h): 85 | h = re.sub(' +', ' ', h) 86 | self.h = h 87 | self.source = 'cblas' 88 | parsed = re.search(cblas_re, h) 89 | if not parsed: 90 | self.source = 'sm' 91 | parsed = re.search(sm_re, h) 92 | if not parsed: 93 | self.source = 'ipp' 94 | parsed = re.search(ipp_re, h) 95 | if not parsed: 96 | self.source = 'vml' 97 | parsed = re.search(vml_re, h) 98 | if not parsed: raise Exception(f'Failed to match: {h}') 99 | 100 | ps,self.uname,self.ret,self.type = [parsed.group(o) for o in ("ps","f","r","l")] 101 | ps = re.split(r', *', ps) 102 | try: ps = [c2swift(p) for p in ps] 103 | except Exception as e: raise Exception(f"{e}:\n{h}\n{param_re}") 104 | self.parsed = parsed 105 | self.params = ps 106 | self.lname = lower1(self.uname) 107 | 108 | def decl(self, skips=None): 109 | r = self.ret 110 | if r in ('void','IppStatus'): r = '' 111 | elif r not in no_replace: r = type_replace[r] 112 | if r == "Float": r = "Element" 113 | if r: r = f"->{r}" 114 | params = self.params 115 | if skips: 116 | params = [(n,'Self' if 'PtrT' in t else t) for i,(n,t) in enumerate(params) if i not in skips] 117 | params = [f'_ {n}:{t}' for n,t in params if t != 'IppHintAlgorithm'] 118 | pstr = ', '.join(params) 119 | return f'{self.lname}({pstr}){r}' 120 | 121 | def impl(self,t): 122 | params = [get_call(n,ty) for n,ty in self.params] 123 | if t!='Float': params = [o for o in params if o!='ippAlgHintFast'] 124 | pstr = ','.join(params) 125 | if self.ret=='IppStatus': ret='_=' 126 | elif self.ret and (self.ret != 'void'): ret='return ' 127 | else: ret='' 128 | f_name = name_lu[self.source] 129 | return f'{ret}{f_name(self.uname,t)}({pstr})' 130 | 131 | def find_name(self, names, ts): 132 | for o in names: 133 | for i,p in enumerate(self.params): 134 | if p[0]==o and p[1] in ts: return i 135 | 136 | def find_p(self): return self.find_name(names_p, ('PtrT')) #,'MutPtrT')) 137 | def find_c(self): return self.find_name(names_c, ('Int')) 138 | 139 | def decl_inst(self): 140 | pidx,cidx = self.find_p(),self.find_c() 141 | if pidx is None and cidx is None: return None 142 | return self.decl((pidx,cidx)) 143 | 144 | def impl_inst(self): 145 | pidx,cidx = self.find_p(),self.find_c() 146 | if pidx is None and cidx is None: return None 147 | ptrs = [i for i,o in enumerate(self.params) if 'PtrT' in o[1]] 148 | params = [o for o,_ in self.params] 149 | for i in ptrs: params[i] = f'{params[i]}.p' 150 | if pidx is not None: params[pidx]='self.p' 151 | if cidx is not None: params[cidx]='self.c' 152 | params = [o for o in params if o!='hint'] 153 | pstr = ','.join(params) 154 | if self.ret and (self.ret not in 'IppStatus','void'): ret='return ' 155 | else: ret='' 156 | return f'{ret}Element.{self.lname}({pstr})' 157 | 158 | def decl_all(self): return f'static func {self.decl()}' 159 | def impl_all(self,t): return f'@inlinable public static func {self.decl()} {{{self.impl(t)}}}' 160 | def impl_all_inst(self): 161 | res = self.decl_inst() 162 | if not res: return 163 | return f'@inlinable public func {self.decl_inst()} {{{self.impl_inst()}}}' 164 | 165 | def test_parse() : 166 | vml1_in = "_Mkl_Api(void,vsLog1p,(const MKL_INT n, const float a[], float r[]))" 167 | vml2_in = "_Mkl_Api(void,vsAtan2,(const MKL_INT n, const float a[], const float b[], float r[]))" 168 | cblas1_in = "float cblas_sasum(const MKL_INT N, const float *X, const MKL_INT incX)" 169 | ipp1_in = "IPPAPI(IppStatus, ippsStdDev_32f, (const Ipp32f* pSrc, int len, Ipp32f* pStdDev, IppHintAlgorithm hint))" 170 | ipp2_in = "IPPAPI(IppStatus, ippsAddC_32f, (const Ipp32f* pSrc, Ipp32f val, Ipp32f* pDst, int len))" 171 | ipp3_in = "IPPAPI(IppStatus, ippsNormDiff_Inf_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm))" 172 | all_in = (vml1_in, vml2_in, cblas1_in, ipp1_in, ipp2_in, ipp3_in) 173 | 174 | vml1_exp_decl = "log1p(_ n:Int, _ a:PtrT, _ r:MutPtrT)" 175 | vml2_exp_decl = "atan2(_ n:Int, _ a:PtrT, _ b:PtrT, _ r:MutPtrT)" 176 | cblas1_exp_decl = "asum(_ N:Int, _ X:PtrT, _ incX:Int)->Element" 177 | ipp1_exp_decl = "stdDev(_ pSrc:PtrT, _ len:Int, _ pStdDev:MutPtrT)" 178 | ipp2_exp_decl = "addC(_ pSrc:PtrT, _ val:Element, _ pDst:MutPtrT, _ len:Int)" 179 | ipp3_exp_decl = "normDiff_Inf(_ pSrc1:PtrT, _ pSrc2:PtrT, _ len:Int, _ pNorm:MutPtrT)" 180 | all_exp_decl = (vml1_exp_decl, vml2_exp_decl, cblas1_exp_decl, ipp1_exp_decl, ipp2_exp_decl, ipp3_exp_decl) 181 | 182 | vml1_exp_impl = "vsLog1p(numericCast(n),a,r)" 183 | vml2_exp_impl = "vsAtan2(numericCast(n),a,b,r)" 184 | cblas1_exp_impl = "return cblas_sasum(numericCast(N),X,numericCast(incX))" 185 | ipp1_exp_impl = "_=ippsStdDev_32f(pSrc,numericCast(len),pStdDev,ippAlgHintFast)" 186 | ipp1b_exp_impl = "_=ippsStdDev_64f(pSrc,numericCast(len),pStdDev)" 187 | ipp2_exp_impl = "_=ippsAddC_32f(pSrc,val,pDst,numericCast(len))" 188 | ipp3_exp_impl = "_=ippsNormDiff_Inf_32f(pSrc1,pSrc2,numericCast(len),pNorm)" 189 | all_exp_impl = (vml1_exp_impl, vml2_exp_impl, cblas1_exp_impl, ipp1_exp_impl, ipp2_exp_impl, ipp3_exp_impl) 190 | 191 | for inp,decl,impl in zip(all_in, all_exp_decl, all_exp_impl): 192 | c = MklHeader(inp) 193 | res = c.decl() 194 | assert res == decl, f'{res}\n{decl}' 195 | res = c.impl('Float') 196 | assert res == impl, f'{res}\n{impl}' 197 | print(c.decl_all()) 198 | print(c.impl_all('Float')) 199 | print(c.impl_all_inst()) 200 | 201 | c = MklHeader(ipp1_in) 202 | res = c.impl('Double') 203 | assert res == ipp1b_exp_impl, f'{res}\n{ipp1b_exp_impl}' 204 | 205 | print("done") 206 | all_lines = sm_lines+cblas_lines+vml_lines+ipps_lines+rng_lines 207 | all_h = [MklHeader(o) for o in all_lines] 208 | print([(o.source,o.h) for o in all_h if o.lname=='abs']) 209 | 210 | if __name__=='__main__': test_parse() 211 | 212 | -------------------------------------------------------------------------------- /custom/list_ipl: -------------------------------------------------------------------------------- 1 | cblas_caxpy 2 | cblas_caxpyi 3 | cblas_ccopy 4 | cblas_cgbmv 5 | cblas_cgemm 6 | cblas_cgemv 7 | cblas_cgerc 8 | cblas_cgeru 9 | cblas_cgthr 10 | cblas_cgthrz 11 | cblas_chbmv 12 | cblas_chemm 13 | cblas_chemv 14 | cblas_cher 15 | cblas_cher2 16 | cblas_cher2k 17 | cblas_cherk 18 | cblas_chpmv 19 | cblas_chpr 20 | cblas_chpr2 21 | cblas_crotg 22 | cblas_cscal 23 | cblas_csctr 24 | cblas_csrot 25 | cblas_csscal 26 | cblas_cswap 27 | cblas_csymm 28 | cblas_csyr2k 29 | cblas_csyrk 30 | cblas_ctbmv 31 | cblas_ctbsv 32 | cblas_ctpmv 33 | cblas_ctpsv 34 | cblas_ctrmm 35 | cblas_ctrmv 36 | cblas_ctrsm 37 | cblas_ctrsv 38 | cblas_dasum 39 | cblas_daxpy 40 | cblas_daxpyi 41 | cblas_dcopy 42 | cblas_ddot 43 | cblas_ddoti 44 | cblas_dgbmv 45 | cblas_dgemm 46 | cblas_dgemv 47 | cblas_dger 48 | cblas_dgthr 49 | cblas_dgthrz 50 | cblas_dnrm2 51 | cblas_drot 52 | cblas_drotg 53 | cblas_droti 54 | cblas_drotm 55 | cblas_drotmg 56 | cblas_dsbmv 57 | cblas_dscal 58 | cblas_dsctr 59 | cblas_dsdot 60 | cblas_dspmv 61 | cblas_dspr 62 | cblas_dspr2 63 | cblas_dswap 64 | cblas_dsymm 65 | cblas_dsymv 66 | cblas_dsyr 67 | cblas_dsyr2 68 | cblas_dsyr2k 69 | cblas_dsyrk 70 | cblas_dtbmv 71 | cblas_dtbsv 72 | cblas_dtpmv 73 | cblas_dtpsv 74 | cblas_dtrmm 75 | cblas_dtrmv 76 | cblas_dtrsm 77 | cblas_dtrsv 78 | cblas_dzasum 79 | cblas_dznrm2 80 | cblas_icamax 81 | cblas_icamin 82 | cblas_idamax 83 | cblas_idamin 84 | cblas_isamax 85 | cblas_isamin 86 | cblas_izamax 87 | cblas_izamin 88 | cblas_sasum 89 | cblas_saxpy 90 | cblas_saxpyi 91 | cblas_scasum 92 | cblas_scnrm2 93 | cblas_scopy 94 | cblas_sdot 95 | cblas_sdoti 96 | cblas_sdsdot 97 | cblas_sgbmv 98 | cblas_sgemm 99 | cblas_sgemv 100 | cblas_sger 101 | cblas_sgthr 102 | cblas_sgthrz 103 | cblas_snrm2 104 | cblas_srot 105 | cblas_srotg 106 | cblas_sroti 107 | cblas_srotm 108 | cblas_srotmg 109 | cblas_ssbmv 110 | cblas_sscal 111 | cblas_ssctr 112 | cblas_sspmv 113 | cblas_sspr 114 | cblas_sspr2 115 | cblas_sswap 116 | cblas_ssymm 117 | cblas_ssymv 118 | cblas_ssyr 119 | cblas_ssyr2 120 | cblas_ssyr2k 121 | cblas_ssyrk 122 | cblas_stbmv 123 | cblas_stbsv 124 | cblas_stpmv 125 | cblas_stpsv 126 | cblas_strmm 127 | cblas_strmv 128 | cblas_strsm 129 | cblas_strsv 130 | cblas_zaxpy 131 | cblas_zaxpyi 132 | cblas_zcopy 133 | cblas_zdrot 134 | cblas_zdscal 135 | cblas_zgbmv 136 | cblas_zgemm 137 | cblas_zgemv 138 | cblas_zgerc 139 | cblas_zgeru 140 | cblas_zgthr 141 | cblas_zgthrz 142 | cblas_zhbmv 143 | cblas_zhemm 144 | cblas_zhemv 145 | cblas_zher 146 | cblas_zher2 147 | cblas_zher2k 148 | cblas_zherk 149 | cblas_zhpmv 150 | cblas_zhpr 151 | cblas_zhpr2 152 | cblas_zrotg 153 | cblas_zscal 154 | cblas_zsctr 155 | cblas_zswap 156 | cblas_zsymm 157 | cblas_zsyr2k 158 | cblas_zsyrk 159 | cblas_ztbmv 160 | cblas_ztbsv 161 | cblas_ztpmv 162 | cblas_ztpsv 163 | cblas_ztrmm 164 | cblas_ztrmv 165 | cblas_ztrsm 166 | cblas_ztrsv 167 | vsExp2 168 | vsExp10 169 | vsLog2 170 | vsLogb 171 | vsCospi 172 | vsSinpi 173 | vsTanpi 174 | vsCosd 175 | vsSind 176 | vsTand 177 | vsAcospi 178 | vsAsinpi 179 | vsAtanpi 180 | vsAtan2pi 181 | vsPowr 182 | vsFrac 183 | vsFmod 184 | vsRemainder 185 | vsNextAfter 186 | vsCopySign 187 | vsFdim 188 | vsFmax 189 | vsFmin 190 | vsMaxMag 191 | vsMinMag 192 | vsExpInt1 193 | cblas_saxpby 194 | cblas_sgemmt 195 | cblas_sgemm_pack_get_size 196 | cblas_sgemm_pack 197 | cblas_sgemm_compute 198 | cblas_sgemm_free 199 | cblas_daxpby 200 | cblas_dgemmt 201 | cblas_dgemm_pack_get_size 202 | cblas_dgemm_pack 203 | cblas_dgemm_compute 204 | cblas_dgemm_free 205 | vdExp2 206 | vdExp10 207 | vdLog2 208 | vdLogb 209 | vdCospi 210 | vdSinpi 211 | vdTanpi 212 | vdCosd 213 | vdSind 214 | vdTand 215 | vdAcospi 216 | vdAsinpi 217 | vdAtanpi 218 | vdAtan2pi 219 | vdPowr 220 | vdFrac 221 | vdFmod 222 | vdRemainder 223 | vdNextAfter 224 | vdCopySign 225 | vdFdim 226 | vdFmax 227 | vdFmin 228 | vdMaxMag 229 | vdMinMag 230 | vdExpInt1 231 | viRngUniform 232 | viRngBinomial 233 | viRngNegBinomial 234 | viRngBernoulli 235 | viRngGeometric 236 | viRngPoisson 237 | MKL_Get_Version_String 238 | MKL_Get_Version 239 | MKL_malloc 240 | MKL_free 241 | mkl_serv_finalize 242 | vmsCeil 243 | vsCeil 244 | vmsFloor 245 | vsFloor 246 | vmsNearbyInt 247 | vsNearbyInt 248 | vmsRint 249 | vsRint 250 | vmsRound 251 | vsRound 252 | vmsTrunc 253 | vsTrunc 254 | vmsAbs 255 | vsAbs 256 | vmsInv 257 | vsInv 258 | vmsSqrt 259 | vsSqrt 260 | vmsInvSqrt 261 | vsInvSqrt 262 | vmsCbrt 263 | vsCbrt 264 | vmsInvCbrt 265 | vsInvCbrt 266 | vmsExp 267 | vsExp 268 | vmsLn 269 | vsLn 270 | vmsLog10 271 | vsLog10 272 | vmsCos 273 | vsCos 274 | vmsSin 275 | vsSin 276 | vmsTan 277 | vsTan 278 | vmsAcos 279 | vsAcos 280 | vmsAcosh 281 | vsAcosh 282 | vmsAsin 283 | vsAsin 284 | vmsAsinh 285 | vsAsinh 286 | vmsAtan 287 | vsAtan 288 | vmsAtanh 289 | vsAtanh 290 | vmsCosh 291 | vsCosh 292 | vmsSinh 293 | vsSinh 294 | vmsTanh 295 | vsTanh 296 | vmsErf 297 | vsErf 298 | vmsErfc 299 | vsErfc 300 | vmsErfInv 301 | vsErfInv 302 | vmsSqr 303 | vsSqr 304 | vmsExpm1 305 | vsExpm1 306 | vmsLog1p 307 | vsLog1p 308 | vmsPow3o2 309 | vsPow3o2 310 | vmsPow2o3 311 | vsPow2o3 312 | vmsErfcInv 313 | vsErfcInv 314 | vmsCdfNorm 315 | vsCdfNorm 316 | vmsCdfNormInv 317 | vsCdfNormInv 318 | vmsLGamma 319 | vsLGamma 320 | vmsTGamma 321 | vsTGamma 322 | vdCeil 323 | vmdCeil 324 | vdFloor 325 | vmdFloor 326 | vdNearbyInt 327 | vmdNearbyInt 328 | vdRint 329 | vmdRint 330 | vdRound 331 | vmdRound 332 | vdTrunc 333 | vmdTrunc 334 | vdAbs 335 | vmdAbs 336 | vdInv 337 | vmdInv 338 | vdSqrt 339 | vmdSqrt 340 | vdInvSqrt 341 | vmdInvSqrt 342 | vdCbrt 343 | vmdCbrt 344 | vdInvCbrt 345 | vmdInvCbrt 346 | vdExp 347 | vmdExp 348 | vdLn 349 | vmdLn 350 | vdLog10 351 | vmdLog10 352 | vdCos 353 | vmdCos 354 | vdSin 355 | vmdSin 356 | vdTan 357 | vmdTan 358 | vdAcos 359 | vmdAcos 360 | vdAcosh 361 | vmdAcosh 362 | vdAsin 363 | vmdAsin 364 | vdAsinh 365 | vmdAsinh 366 | vdAtan 367 | vmdAtan 368 | vdAtanh 369 | vmdAtanh 370 | vdCosh 371 | vmdCosh 372 | vdSinh 373 | vmdSinh 374 | vdTanh 375 | vmdTanh 376 | vdErf 377 | vmdErf 378 | vdErfc 379 | vmdErfc 380 | vdErfInv 381 | vmdErfInv 382 | vdSqr 383 | vmdSqr 384 | vdExpm1 385 | vmdExpm1 386 | vdLog1p 387 | vmdLog1p 388 | vdPow3o2 389 | vmdPow3o2 390 | vdPow2o3 391 | vmdPow2o3 392 | vdErfcInv 393 | vmdErfcInv 394 | vdCdfNorm 395 | vmdCdfNorm 396 | vdCdfNormInv 397 | vmdCdfNormInv 398 | vdLGamma 399 | vmdLGamma 400 | vdTGamma 401 | vmdTGamma 402 | vcCos 403 | vmcCos 404 | vcSin 405 | vmcSin 406 | vcTan 407 | vmcTan 408 | vcCosh 409 | vmcCosh 410 | vcSinh 411 | vmcSinh 412 | vcTanh 413 | vmcTanh 414 | vcAcos 415 | vmcAcos 416 | vcAsin 417 | vmcAsin 418 | vcAtan 419 | vmcAtan 420 | vcAcosh 421 | vmcAcosh 422 | vcAsinh 423 | vmcAsinh 424 | vcAtanh 425 | vmcAtanh 426 | vcExp 427 | vmcExp 428 | vcLn 429 | vmcLn 430 | vcLog10 431 | vmcLog10 432 | vcSqrt 433 | vmcSqrt 434 | vcConj 435 | vmcConj 436 | vmzCos 437 | vzCos 438 | vmzSin 439 | vzSin 440 | vmzTan 441 | vzTan 442 | vmzCosh 443 | vzCosh 444 | vmzSinh 445 | vzSinh 446 | vmzTanh 447 | vzTanh 448 | vmzAcos 449 | vzAcos 450 | vmzAsin 451 | vzAsin 452 | vmzAtan 453 | vzAtan 454 | vmzAcosh 455 | vzAcosh 456 | vmzAsinh 457 | vzAsinh 458 | vmzAtanh 459 | vzAtanh 460 | vmzExp 461 | vzExp 462 | vmzLn 463 | vzLn 464 | vmzLog10 465 | vzLog10 466 | vmzSqrt 467 | vzSqrt 468 | vmzConj 469 | vzConj 470 | vcCIS 471 | vmcCIS 472 | vmzCIS 473 | vzCIS 474 | vcAbs 475 | vmcAbs 476 | vcArg 477 | vmcArg 478 | vmzAbs 479 | vzAbs 480 | vmzArg 481 | vzArg 482 | vmsDiv 483 | vsDiv 484 | vmsPow 485 | vsPow 486 | vmsAtan2 487 | vsAtan2 488 | vmsHypot 489 | vsHypot 490 | vmsAdd 491 | vsAdd 492 | vmsSub 493 | vsSub 494 | vmsMul 495 | vsMul 496 | vdDiv 497 | vmdDiv 498 | vdPow 499 | vmdPow 500 | vdAtan2 501 | vmdAtan2 502 | vdHypot 503 | vmdHypot 504 | vdAdd 505 | vmdAdd 506 | vdSub 507 | vmdSub 508 | vdMul 509 | vmdMul 510 | vcDiv 511 | vmcDiv 512 | vcPow 513 | vmcPow 514 | vcAdd 515 | vmcAdd 516 | vcSub 517 | vmcSub 518 | vcMul 519 | vmcMul 520 | vcMulByConj 521 | vmcMulByConj 522 | vmzDiv 523 | vzDiv 524 | vmzPow 525 | vzPow 526 | vmzAdd 527 | vzAdd 528 | vmzSub 529 | vzSub 530 | vmzMul 531 | vzMul 532 | vmzMulByConj 533 | vzMulByConj 534 | vcPowx 535 | vmcPowx 536 | vmzPowx 537 | vzPowx 538 | vmsPowx 539 | vsPowx 540 | vdPowx 541 | vmdPowx 542 | vmsSinCos 543 | vsSinCos 544 | vmsModf 545 | vsModf 546 | vdSinCos 547 | vmdSinCos 548 | vdModf 549 | vmdModf 550 | vmsLinearFrac 551 | vsLinearFrac 552 | vdLinearFrac 553 | vmdLinearFrac 554 | vmsPackI 555 | vsPackI 556 | vdPackI 557 | vmdPackI 558 | vcPackI 559 | vmcPackI 560 | vmzPackI 561 | vzPackI 562 | vmsPackM 563 | vsPackM 564 | vdPackM 565 | vmdPackM 566 | vcPackM 567 | vmcPackM 568 | vmzPackM 569 | vzPackM 570 | vmsPackV 571 | vsPackV 572 | vdPackV 573 | vmdPackV 574 | vcPackV 575 | vmcPackV 576 | vmzPackV 577 | vzPackV 578 | vmsUnpackI 579 | vsUnpackI 580 | vdUnpackI 581 | vmdUnpackI 582 | vcUnpackI 583 | vmcUnpackI 584 | vmzUnpackI 585 | vzUnpackI 586 | vmsUnpackM 587 | vsUnpackM 588 | vdUnpackM 589 | vmdUnpackM 590 | vcUnpackM 591 | vmcUnpackM 592 | vmzUnpackM 593 | vzUnpackM 594 | vmsUnpackV 595 | vsUnpackV 596 | vdUnpackV 597 | vmdUnpackV 598 | vcUnpackV 599 | vmcUnpackV 600 | vmzUnpackV 601 | vzUnpackV 602 | vmlClearErrStatus 603 | vmlClearErrorCallBack 604 | vmlGetErrStatus 605 | vmlGetErrorCallBack 606 | vmlSetErrStatus 607 | vmlSetErrorCallBack 608 | vmlGetMode 609 | vmlSetMode 610 | vdRngCauchy 611 | vsRngCauchy 612 | vdRngExponential 613 | vsRngExponential 614 | vdRngGaussian 615 | vsRngGaussian 616 | vdRngGaussianMV 617 | vsRngGaussianMV 618 | vdRngGumbel 619 | vsRngGumbel 620 | vdRngLaplace 621 | vsRngLaplace 622 | vdRngLognormal 623 | vsRngLognormal 624 | vdRngRayleigh 625 | vsRngRayleigh 626 | vdRngUniform 627 | vsRngUniform 628 | vdRngWeibull 629 | vsRngWeibull 630 | vdRngBeta 631 | vsRngBeta 632 | vdRngGamma 633 | vsRngGamma 634 | viRngBernoulli 635 | viRngBinomial 636 | viRngGeometric 637 | viRngHypergeometric 638 | viRngNegBinomial 639 | viRngNegbinomial 640 | viRngPoisson 641 | viRngPoissonV 642 | viRngUniform 643 | viRngUniformBits 644 | viRngUniformBits32 645 | viRngUniformBits64 646 | vslCopyStream 647 | vslCopyStreamState 648 | vslDeleteStream 649 | vslGetStreamStateBrng 650 | vslLeapfrogStream 651 | vslNewStream 652 | vslNewStreamEx 653 | vslSkipAheadStream 654 | vsldNewAbstractStream 655 | vsliNewAbstractStream 656 | vslsNewAbstractStream 657 | vslGetBrngProperties 658 | vslGetNumRegBrngs 659 | vslRegisterBrng 660 | vsldSSCompute 661 | vsldSSEditCovCor 662 | vsldSSEditMissingValues 663 | vsldSSEditMoments 664 | vsldSSEditCorParameterization 665 | vsldSSEditOutliersDetection 666 | vsldSSEditPooledCovariance 667 | vsldSSEditPartialCovCor 668 | vsldSSEditQuantiles 669 | vsldSSEditRobustCovariance 670 | vsldSSEditStreamQuantiles 671 | vsldSSEditTask 672 | vslSSDeleteTask 673 | vsldSSNewTask 674 | vsliSSEditTask 675 | vslsSSCompute 676 | vslsSSEditCovCor 677 | vslsSSEditMissingValues 678 | vslsSSEditMoments 679 | vslsSSEditCorParameterization 680 | vslsSSEditOutliersDetection 681 | vslsSSEditPooledCovariance 682 | vslsSSEditPartialCovCor 683 | vslsSSEditQuantiles 684 | vslsSSEditRobustCovariance 685 | vslsSSEditStreamQuantiles 686 | vslsSSEditTask 687 | vslsSSNewTask 688 | vslGetStreamSize 689 | vslLoadStreamF 690 | vslLoadStreamM 691 | vslSaveStreamF 692 | vslSaveStreamM 693 | ippInit 694 | ippsGetLibVersion 695 | ippsCopy_32f 696 | ippsMove_32f 697 | ippsSet_32f 698 | ippsZero_32f 699 | ippsTriangle_32f 700 | ippsVectorJaehne_32f 701 | ippsVectorSlope_32f 702 | ippsAddC_32f 703 | ippsAddProduct_32f 704 | ippsMulC_32f 705 | ippsSubC_32f 706 | ippsSubCRev_32f 707 | ippsDivC_32f 708 | ippsSumLn_32f 709 | ippsArctan_32f 710 | ippsNormalize_32f 711 | ippsMagnitude_32f 712 | ippsPhase_32f 713 | ippsPowerSpectr_32f 714 | ippsThreshold_LT_32f 715 | ippsThreshold_GT_32f 716 | ippsThreshold_LTAbs_32f 717 | ippsThreshold_GTAbs_32f 718 | ippsThreshold_LTAbsVal_32f 719 | ippsThreshold_LTVal_32f 720 | ippsThreshold_GTVal_32f 721 | ippsThreshold_LTValGTVal_32f 722 | ippsThreshold_LTInv_32f 723 | ippsCartToPolar_32f 724 | ippsPolarToCart_32f 725 | ippsFlip_32f 726 | ippsWinBartlett_32f 727 | ippsWinHann_32f 728 | ippsWinHamming_32f 729 | ippsWinBlackman_32f 730 | ippsWinBlackmanStd_32f 731 | ippsWinBlackmanOpt_32f 732 | ippsWinKaiser_32f 733 | ippsSum_32f 734 | ippsMin_32f 735 | ippsMax_32f 736 | ippsMinMax_32f 737 | ippsMinAbs_32f 738 | ippsMaxAbs_32f 739 | ippsMinIndx_32f 740 | ippsMaxIndx_32f 741 | ippsMinMaxIndx_32f 742 | ippsMean_32f 743 | ippsStdDev_32f 744 | ippsMeanStdDev_32f 745 | ippsNorm_Inf_32f 746 | ippsNorm_L1_32f 747 | ippsNorm_L2_32f 748 | ippsNormDiff_Inf_32f 749 | ippsNormDiff_L1_32f 750 | ippsNormDiff_L2_32f 751 | ippsDotProd_32f 752 | ippsMinEvery_32f 753 | ippsMaxEvery_32f 754 | ippsMaxOrder_32f 755 | ippsSampleUp_32f 756 | ippsSampleDown_32f 757 | ippsFilterMedian_32f 758 | ippsCopy_64f 759 | ippsMove_64f 760 | ippsSet_64f 761 | ippsZero_64f 762 | ippsTriangle_64f 763 | ippsVectorJaehne_64f 764 | ippsVectorSlope_64f 765 | ippsAddC_64f 766 | ippsAddProduct_64f 767 | ippsMulC_64f 768 | ippsSubC_64f 769 | ippsSubCRev_64f 770 | ippsDivC_64f 771 | ippsSumLn_64f 772 | ippsArctan_64f 773 | ippsNormalize_64f 774 | ippsMagnitude_64f 775 | ippsPhase_64f 776 | ippsPowerSpectr_64f 777 | ippsThreshold_LT_64f 778 | ippsThreshold_GT_64f 779 | ippsThreshold_LTAbs_64f 780 | ippsThreshold_GTAbs_64f 781 | ippsThreshold_LTAbsVal_64f 782 | ippsThreshold_LTVal_64f 783 | ippsThreshold_GTVal_64f 784 | ippsThreshold_LTValGTVal_64f 785 | ippsThreshold_LTInv_64f 786 | ippsCartToPolar_64f 787 | ippsPolarToCart_64f 788 | ippsFlip_64f 789 | ippsWinBartlett_64f 790 | ippsWinHann_64f 791 | ippsWinHamming_64f 792 | ippsWinBlackman_64f 793 | ippsWinBlackmanStd_64f 794 | ippsWinBlackmanOpt_64f 795 | ippsWinKaiser_64f 796 | ippsSum_64f 797 | ippsMin_64f 798 | ippsMax_64f 799 | ippsMinMax_64f 800 | ippsMinAbs_64f 801 | ippsMaxAbs_64f 802 | ippsMinIndx_64f 803 | ippsMaxIndx_64f 804 | ippsMinMaxIndx_64f 805 | ippsMean_64f 806 | ippsStdDev_64f 807 | ippsMeanStdDev_64f 808 | ippsNorm_Inf_64f 809 | ippsNorm_L1_64f 810 | ippsNorm_L2_64f 811 | ippsNormDiff_Inf_64f 812 | ippsNormDiff_L1_64f 813 | ippsNormDiff_L2_64f 814 | ippsDotProd_64f 815 | ippsMinEvery_64f 816 | ippsMaxEvery_64f 817 | ippsMaxOrder_64f 818 | ippsSampleUp_64f 819 | ippsSampleDown_64f 820 | ippsFilterMedian_64f 821 | -------------------------------------------------------------------------------- /mkl_funcs.py: -------------------------------------------------------------------------------- 1 | ### AUTO-GENERATED BY get_headers.py ### 2 | 3 | cblas_lines=['float cblas_sdot(const MKL_INT N, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY);', 'float cblas_sdoti(const MKL_INT N, const float *X, const MKL_INT *indx, const float *Y);', 'float cblas_snrm2(const MKL_INT N, const float *X, const MKL_INT incX);', 'float cblas_sasum(const MKL_INT N, const float *X, const MKL_INT incX);', 'void cblas_sswap(const MKL_INT N, float *X, const MKL_INT incX, float *Y, const MKL_INT incY);', 'void cblas_scopy(const MKL_INT N, const float *X, const MKL_INT incX, float *Y, const MKL_INT incY);', 'void cblas_saxpy(const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, float *Y, const MKL_INT incY);', 'void cblas_saxpby(const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY);', 'void cblas_saxpyi(const MKL_INT N, const float alpha, const float *X, const MKL_INT *indx, float *Y);', 'void cblas_sgthr(const MKL_INT N, const float *Y, float *X, const MKL_INT *indx);', 'void cblas_sgthrz(const MKL_INT N, float *Y, float *X, const MKL_INT *indx);', 'void cblas_ssctr(const MKL_INT N, const float *X, const MKL_INT *indx, float *Y);', 'void cblas_srotg(float *a, float *b, float *c, float *s);', 'void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P);', 'void cblas_srot(const MKL_INT N, float *X, const MKL_INT incX, float *Y, const MKL_INT incY, const float c, const float s);', 'void cblas_sroti(const MKL_INT N, float *X, const MKL_INT *indx, float *Y, const float c, const float s);', 'void cblas_srotm(const MKL_INT N, float *X, const MKL_INT incX, float *Y, const MKL_INT incY, const float *P);', 'void cblas_sscal(const MKL_INT N, const float alpha, float *X, const MKL_INT incX);', 'void cblas_sgemv(const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY);', 'void cblas_sgbmv(const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const MKL_INT M, const MKL_INT N, const MKL_INT KL, const MKL_INT KU, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY);', 'void cblas_strmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *A, const MKL_INT lda, float *X, const MKL_INT incX);', 'void cblas_stbmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const MKL_INT K, const float *A, const MKL_INT lda, float *X, const MKL_INT incX);', 'void cblas_stpmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *Ap, float *X, const MKL_INT incX);', 'void cblas_strsv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *A, const MKL_INT lda, float *X, const MKL_INT incX);', 'void cblas_stbsv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const MKL_INT K, const float *A, const MKL_INT lda, float *X, const MKL_INT incX);', 'void cblas_stpsv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT N, const float *Ap, float *X, const MKL_INT incX);', 'void cblas_ssymv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY);', 'void cblas_ssbmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY);', 'void cblas_sspmv(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *Ap, const float *X, const MKL_INT incX, const float beta, float *Y, const MKL_INT incY);', 'void cblas_sger(const CBLAS_LAYOUT Layout, const MKL_INT M, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY, float *A, const MKL_INT lda);', 'void cblas_ssyr(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, float *A, const MKL_INT lda);', 'void cblas_sspr(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, float *Ap);', 'void cblas_ssyr2(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY, float *A, const MKL_INT lda);', 'void cblas_sspr2(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const MKL_INT N, const float alpha, const float *X, const MKL_INT incX, const float *Y, const MKL_INT incY, float *A);', 'void cblas_sgemm(const CBLAS_LAYOUT Layout, const CBLAS_TRANSPOSE TransA, const CBLAS_TRANSPOSE TransB, const MKL_INT M, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc);', 'void cblas_sgemmt(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_TRANSPOSE TransB, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc);', 'void cblas_ssymm(const CBLAS_LAYOUT Layout, const CBLAS_SIDE Side, const CBLAS_UPLO Uplo, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc);', 'void cblas_ssyrk(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE Trans, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float beta, float *C, const MKL_INT ldc);', 'void cblas_ssyr2k(const CBLAS_LAYOUT Layout, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE Trans, const MKL_INT N, const MKL_INT K, const float alpha, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc);', 'void cblas_strmm(const CBLAS_LAYOUT Layout, const CBLAS_SIDE Side, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, float *B, const MKL_INT ldb);', 'void cblas_strsm(const CBLAS_LAYOUT Layout, const CBLAS_SIDE Side, const CBLAS_UPLO Uplo, const CBLAS_TRANSPOSE TransA, const CBLAS_DIAG Diag, const MKL_INT M, const MKL_INT N, const float alpha, const float *A, const MKL_INT lda, float *B, const MKL_INT ldb);', 'MKL_INT cblas_sgemm_pack_get_size(const CBLAS_IDENTIFIER identifier, const MKL_INT M, const MKL_INT N, const MKL_INT K);', 'void cblas_sgemm_pack(const CBLAS_LAYOUT Layout, const CBLAS_IDENTIFIER identifier, const CBLAS_TRANSPOSE Trans, const MKL_INT M, const MKL_INT N, const MKL_INT K, const float alpha, const float *src, const MKL_INT ld, float *dest);', 'void cblas_sgemm_compute(const CBLAS_LAYOUT Layout, const MKL_INT TransA, const MKL_INT TransB, const MKL_INT M, const MKL_INT N, const MKL_INT K, const float *A, const MKL_INT lda, const float *B, const MKL_INT ldb, const float beta, float *C, const MKL_INT ldc);', 'void cblas_sgemm_free(float *dest);'] 4 | vml_lines=['_Mkl_Api(void,vsAbs,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsInv,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsSqrt,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsInvSqrt,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsCbrt,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsInvCbrt,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsSqr,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsExp,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsExp2, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsExp10, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsExpm1,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsLn,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsLog2, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsLog10,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsLog1p,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsLogb, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsCos,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsSin,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsTan,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsCospi, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsSinpi, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsTanpi, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsCosd, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsSind, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsTand, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsCosh,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsSinh,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsTanh,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsAcos,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsAsin,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsAtan,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsAcospi, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsAsinpi, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsAtanpi, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsAcosh,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsAsinh,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsAtanh,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsErf,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsErfInv,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsHypot,(const MKL_INT n, const float a[], const float b[], float r[]))', '_Mkl_Api(void,vsErfc,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsErfcInv,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsCdfNorm,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsCdfNormInv,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsLGamma,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsTGamma,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsAtan2,(const MKL_INT n, const float a[], const float b[], float r[]))', '_Mkl_Api(void, vsAtan2pi, (const MKL_INT n, const float a[], const float b[], float r[]))', '_Mkl_Api(void,vsPow,(const MKL_INT n, const float a[], const float b[], float r[]))', '_Mkl_Api(void,vsPow3o2,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsPow2o3,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsPowx,(const MKL_INT n, const float a[], const float b, float r[]))', '_Mkl_Api(void, vsPowr, (const MKL_INT n, const float a[], const float b[], float r[]))', '_Mkl_Api(void,vsSinCos,(const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void,vsLinearFrac,(const MKL_INT n, const float a[], const float b[], const float scalea, const float shifta, const float scaleb, const float shiftb, float r[]))', '_Mkl_Api(void,vsCeil,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsFloor,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsFrac,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsModf,(const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsFmod, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsRemainder, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsNextAfter, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsCopySign, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsFdim, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsFmax, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsFmin, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsMaxMag, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void, vsMinMag, (const MKL_INT n, const float a[], float r1[], float r2[]))', '_Mkl_Api(void,vsNearbyInt,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsRint,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsRound,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsTrunc,(const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void, vsExpInt1, (const MKL_INT n, const float a[], float r[]))', '_Mkl_Api(void,vsPackI,(const MKL_INT n, const float a[], const MKL_INT incra, float y[]))', '_Mkl_Api(void,vsPackV,(const MKL_INT n, const float a[], const MKL_INT ia[], float y[]))', '_Mkl_Api(void,vsPackM,(const MKL_INT n, const float a[], const MKL_INT ma[], float y[]))', '_Mkl_Api(void,vsUnpackI,(const MKL_INT n, const float a[], float y[], const MKL_INT incry ))', '_Mkl_Api(void,vsUnpackV,(const MKL_INT n, const float a[], float y[], const MKL_INT iy[] ))', '_Mkl_Api(void,vsUnpackM,(const MKL_INT n, const float a[], float y[], const MKL_INT my[] ))'] 5 | ipps_lines=['IPPAPI(IppStatus, ippsCopy_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsMove_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsSet_32f, (Ipp32f val, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsZero_32f, (Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsTriangle_32f, (Ipp32f* pDst, int len, Ipp32f magn, Ipp32f rFreq, Ipp32f asym, Ipp32f* pPhase))', 'IPPAPI(IppStatus, ippsVectorJaehne_32f, (Ipp32f* pDst, int len, Ipp32f magn))', 'IPPAPI(IppStatus, ippsVectorSlope_32f, (Ipp32f* pDst, int len, Ipp32f offset, Ipp32f slope))', 'IPPAPI(IppStatus, ippsAddProduct_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pSrcDst, int len))', 'IPPAPI(IppStatus, ippsSumLn_32f, (const Ipp32f* pSrc, int len, Ipp32f* pSum))', 'IPPAPI(IppStatus, ippsArctan_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsNormalize_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f vSub, Ipp32f vDiv))', 'IPPAPI(IppStatus, ippsMagnitude_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsPhase_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsPowerSpectr_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsThreshold_LT_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level))', 'IPPAPI(IppStatus, ippsThreshold_GT_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level))', 'IPPAPI(IppStatus, ippsThreshold_LTAbs_32f, (const Ipp32f* pSrc, Ipp32f *pDst, int len, Ipp32f level))', 'IPPAPI(IppStatus, ippsThreshold_GTAbs_32f, (const Ipp32f* pSrc, Ipp32f *pDst, int len, Ipp32f level))', 'IPPAPI(IppStatus, ippsThreshold_LTAbsVal_32f, (const Ipp32f* pSrc, Ipp32f *pDst, int len, Ipp32f level, Ipp32f value))', 'IPPAPI(IppStatus, ippsThreshold_LTVal_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level, Ipp32f value))', 'IPPAPI(IppStatus, ippsThreshold_GTVal_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level, Ipp32f value))', 'IPPAPI(IppStatus, ippsThreshold_LTValGTVal_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f levelLT, Ipp32f valueLT, Ipp32f levelGT, Ipp32f valueGT))', 'IPPAPI(IppStatus, ippsThreshold_LTInv_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f level))', 'IPPAPI(IppStatus, ippsCartToPolar_32f, (const Ipp32f* pSrcRe, const Ipp32f* pSrcIm, Ipp32f* pDstMagn, Ipp32f* pDstPhase, int len))', 'IPPAPI(IppStatus, ippsPolarToCart_32f, (const Ipp32f* pSrcMagn, const Ipp32f* pSrcPhase, Ipp32f* pDstRe, Ipp32f* pDstIm, int len))', 'IPPAPI(IppStatus, ippsFlip_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsWinBartlett_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsWinHann_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsWinHamming_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsWinBlackman_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f alpha))', 'IPPAPI(IppStatus, ippsWinBlackmanStd_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsWinBlackmanOpt_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len))', 'IPPAPI(IppStatus, ippsWinKaiser_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, Ipp32f alpha))', 'IPPAPI(IppStatus, ippsMin_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin))', 'IPPAPI(IppStatus, ippsMax_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMax))', 'IPPAPI(IppStatus, ippsMinMax_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin, Ipp32f* pMax))', 'IPPAPI(IppStatus, ippsMinAbs_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMinAbs))', 'IPPAPI(IppStatus, ippsMaxAbs_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMaxAbs))', 'IPPAPI(IppStatus, ippsMinIndx_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin, int* pIndx))', 'IPPAPI(IppStatus, ippsMaxIndx_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMax, int* pIndx))', 'IPPAPI(IppStatus, ippsMinMaxIndx_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMin, int* pMinIndx, Ipp32f* pMax, int* pMaxIndx))', 'IPPAPI(IppStatus, ippsMean_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMean, IppHintAlgorithm hint))', 'IPPAPI(IppStatus, ippsStdDev_32f, (const Ipp32f* pSrc, int len, Ipp32f* pStdDev, IppHintAlgorithm hint))', 'IPPAPI(IppStatus, ippsMeanStdDev_32f, (const Ipp32f* pSrc, int len, Ipp32f* pMean, Ipp32f* pStdDev, IppHintAlgorithm hint))', 'IPPAPI(IppStatus, ippsNorm_Inf_32f, (const Ipp32f* pSrc, int len, Ipp32f* pNorm))', 'IPPAPI(IppStatus, ippsNorm_L1_32f, (const Ipp32f* pSrc, int len, Ipp32f* pNorm))', 'IPPAPI(IppStatus, ippsNorm_L2_32f, (const Ipp32f* pSrc, int len, Ipp32f* pNorm))', 'IPPAPI(IppStatus, ippsNormDiff_Inf_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm))', 'IPPAPI(IppStatus, ippsNormDiff_L1_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm))', 'IPPAPI(IppStatus, ippsNormDiff_L2_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pNorm))', 'IPPAPI(IppStatus, ippsDotProd_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int len, Ipp32f* pDp))', 'IPPAPI(IppStatus, ippsMinEvery_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, Ipp32u len))', 'IPPAPI(IppStatus, ippsMaxEvery_32f, (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst, Ipp32u len))', 'IPPAPI(IppStatus, ippsMaxOrder_32f, (const Ipp32f* pSrc, int len, int* pOrder))', 'IPPAPI(IppStatus, ippsSampleUp_32f, (const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int* pDstLen, int factor, int* pPhase))', 'IPPAPI(IppStatus, ippsSampleDown_32f, (const Ipp32f* pSrc, int srcLen, Ipp32f* pDst, int* pDstLen, int factor, int* pPhase))', 'IPPAPI(IppStatus, ippsFilterMedian_32f, (const Ipp32f* pSrc, Ipp32f* pDst, int len, int maskSize, const Ipp32f *pDlySrc, Ipp32f *pDlyDst, Ipp8u *pBuffer))'] 6 | rng_lines=['_Mkl_Api(int,vsRngCauchy,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b ))', '_Mkl_Api(int,vsRngUniform,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b ))', '_Mkl_Api(int,vsRngGaussian,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b ))', '_Mkl_Api(int,vsRngGaussianMV,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const MKL_INT dimen, const MKL_INT mstorage, const float *a, const float *t ))', '_Mkl_Api(int,vsRngExponential,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b ))', '_Mkl_Api(int,vsRngLaplace,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b ))', '_Mkl_Api(int,vsRngWeibull,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b , const float c))', '_Mkl_Api(int,vsRngRayleigh,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b ))', '_Mkl_Api(int,vsRngLognormal,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b , const float c, const float d))', '_Mkl_Api(int,vsRngGumbel,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b ))', '_Mkl_Api(int,vsRngGamma,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b , const float c))', '_Mkl_Api(int,vsRngBeta,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const float a, const float b , const float c, const float d))'] 7 | rngi_lines=['_Mkl_Api(int,viRngBernoulli,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a))', '_Mkl_Api(int,viRngUniform,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int a, const int b))', '_Mkl_Api(int,viRngGeometric,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a))', '_Mkl_Api(int,viRngBinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int , const double ))', '_Mkl_Api(int,viRngMultinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int a, const int b, const double * c))', '_Mkl_Api(int,viRngHypergeometric,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const int a, const int b, const int c))', '_Mkl_Api(int,viRngNegbinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a, const double b))', '_Mkl_Api(int,viRngNegBinomial,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a, const double b))', '_Mkl_Api(int,viRngPoisson,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double a ))', '_Mkl_Api(int,viRngPoissonV,(const MKL_INT method, VSLStreamStatePtr stream, const MKL_INT n, float * r, const double * a))'] 8 | -------------------------------------------------------------------------------- /custom/vml_vsl_example_list: -------------------------------------------------------------------------------- 1 | ;=============================================================================== 2 | ; Copyright 2006-2018 Intel Corporation. 3 | ; 4 | ; This software and the related documents are Intel copyrighted materials, and 5 | ; your use of them is governed by the express license under which they were 6 | ; provided to you (License). Unless the License provides otherwise, you may not 7 | ; use, modify, copy, publish, distribute, disclose or transmit this software or 8 | ; the related documents without Intel's prior written permission. 9 | ; 10 | ; This software and the related documents are provided as is, with no express 11 | ; or implied warranties, other than those that are expressly stated in the 12 | ; License. 13 | ;=============================================================================== 14 | 15 | VMSCEIL_ 16 | VSCEIL_ 17 | vmsCeil 18 | vmsceil_ 19 | vsCeil 20 | vsceil_ 21 | VMSFLOOR_ 22 | VSFLOOR_ 23 | vmsFloor 24 | vmsfloor_ 25 | vsFloor 26 | vsfloor_ 27 | VMSNEARBYINT_ 28 | VSNEARBYINT_ 29 | vmsNearbyInt 30 | vmsnearbyint_ 31 | vsNearbyInt 32 | vsnearbyint_ 33 | VMSRINT_ 34 | VSRINT_ 35 | vmsRint 36 | vmsrint_ 37 | vsRint 38 | vsrint_ 39 | VMSROUND_ 40 | VSROUND_ 41 | vmsRound 42 | vmsround_ 43 | vsRound 44 | vsround_ 45 | VMSTRUNC_ 46 | VSTRUNC_ 47 | vmsTrunc 48 | vmstrunc_ 49 | vsTrunc 50 | vstrunc_ 51 | VMSABS_ 52 | VSABS_ 53 | vmsAbs 54 | vmsabs_ 55 | vsAbs 56 | vsabs_ 57 | VMSINV_ 58 | VSINV_ 59 | vmsInv 60 | vmsinv_ 61 | vsInv 62 | vsinv_ 63 | VMSSQRT_ 64 | VSSQRT_ 65 | vmsSqrt 66 | vmssqrt_ 67 | vsSqrt 68 | vssqrt_ 69 | VMSINVSQRT_ 70 | VSINVSQRT_ 71 | vmsInvSqrt 72 | vmsinvsqrt_ 73 | vsInvSqrt 74 | vsinvsqrt_ 75 | VMSCBRT_ 76 | VSCBRT_ 77 | vmsCbrt 78 | vmscbrt_ 79 | vsCbrt 80 | vscbrt_ 81 | VMSINVCBRT_ 82 | VSINVCBRT_ 83 | vmsInvCbrt 84 | vmsinvcbrt_ 85 | vsInvCbrt 86 | vsinvcbrt_ 87 | VMSEXP_ 88 | VSEXP_ 89 | vmsExp 90 | vmsexp_ 91 | vsExp 92 | vsexp_ 93 | VMSLN_ 94 | VSLN_ 95 | vmsLn 96 | vmsln_ 97 | vsLn 98 | vsln_ 99 | VMSLOG10_ 100 | VSLOG10_ 101 | vmsLog10 102 | vmslog10_ 103 | vsLog10 104 | vslog10_ 105 | VMSCOS_ 106 | VSCOS_ 107 | vmsCos 108 | vmscos_ 109 | vsCos 110 | vscos_ 111 | VMSSIN_ 112 | VSSIN_ 113 | vmsSin 114 | vmssin_ 115 | vsSin 116 | vssin_ 117 | VMSTAN_ 118 | VSTAN_ 119 | vmsTan 120 | vmstan_ 121 | vsTan 122 | vstan_ 123 | VMSACOS_ 124 | VSACOS_ 125 | vmsAcos 126 | vmsacos_ 127 | vsAcos 128 | vsacos_ 129 | VMSACOSH_ 130 | VSACOSH_ 131 | vmsAcosh 132 | vmsacosh_ 133 | vsAcosh 134 | vsacosh_ 135 | VMSASIN_ 136 | VSASIN_ 137 | vmsAsin 138 | vmsasin_ 139 | vsAsin 140 | vsasin_ 141 | VMSASINH_ 142 | VSASINH_ 143 | vmsAsinh 144 | vmsasinh_ 145 | vsAsinh 146 | vsasinh_ 147 | VMSATAN_ 148 | VSATAN_ 149 | vmsAtan 150 | vmsatan_ 151 | vsAtan 152 | vsatan_ 153 | VMSATANH_ 154 | VSATANH_ 155 | vmsAtanh 156 | vmsatanh_ 157 | vsAtanh 158 | vsatanh_ 159 | VMSCOSH_ 160 | VSCOSH_ 161 | vmsCosh 162 | vmscosh_ 163 | vsCosh 164 | vscosh_ 165 | VMSSINH_ 166 | VSSINH_ 167 | vmsSinh 168 | vmssinh_ 169 | vsSinh 170 | vssinh_ 171 | VMSTANH_ 172 | VSTANH_ 173 | vmsTanh 174 | vmstanh_ 175 | vsTanh 176 | vstanh_ 177 | VMSERF_ 178 | VSERF_ 179 | vmsErf 180 | vmserf_ 181 | vsErf 182 | vserf_ 183 | VMSERFC_ 184 | VSERFC_ 185 | vmsErfc 186 | vmserfc_ 187 | vsErfc 188 | vserfc_ 189 | VMSERFINV_ 190 | VSERFINV_ 191 | vmsErfInv 192 | vmserfinv_ 193 | vsErfInv 194 | vserfinv_ 195 | VMSSQR_ 196 | VSSQR_ 197 | vmsSqr 198 | vmssqr_ 199 | vsSqr 200 | vssqr_ 201 | VMSEXPM1_ 202 | VSEXPM1_ 203 | vmsExpm1 204 | vmsexpm1_ 205 | vsExpm1 206 | vsexpm1_ 207 | VMSLOG1P_ 208 | VSLOG1P_ 209 | vmsLog1p 210 | vmslog1p_ 211 | vsLog1p 212 | vslog1p_ 213 | VMSPOW3O2_ 214 | VSPOW3O2_ 215 | vmsPow3o2 216 | vmspow3o2_ 217 | vsPow3o2 218 | vspow3o2_ 219 | VMSPOW2O3_ 220 | VSPOW2O3_ 221 | vmsPow2o3 222 | vmspow2o3_ 223 | vsPow2o3 224 | vspow2o3_ 225 | VMSERFCINV_ 226 | VSERFCINV_ 227 | vmsErfcInv 228 | vmserfcinv_ 229 | vsErfcInv 230 | vserfcinv_ 231 | VMSCDFNORM_ 232 | VSCDFNORM_ 233 | vmsCdfNorm 234 | vmscdfnorm_ 235 | vsCdfNorm 236 | vscdfnorm_ 237 | VMSCDFNORMINV_ 238 | VSCDFNORMINV_ 239 | vmsCdfNormInv 240 | vmscdfnorminv_ 241 | vsCdfNormInv 242 | vscdfnorminv_ 243 | VMSLGAMMA_ 244 | VSLGAMMA_ 245 | vmsLGamma 246 | vmslgamma_ 247 | vsLGamma 248 | vslgamma_ 249 | VMSTGAMMA_ 250 | VSTGAMMA_ 251 | vmsTGamma 252 | vmstgamma_ 253 | vsTGamma 254 | vstgamma_ 255 | VDCEIL_ 256 | VMDCEIL_ 257 | vdCeil 258 | vdceil_ 259 | vmdCeil 260 | vmdceil_ 261 | VDFLOOR_ 262 | VMDFLOOR_ 263 | vdFloor 264 | vdfloor_ 265 | vmdFloor 266 | vmdfloor_ 267 | VDNEARBYINT_ 268 | VMDNEARBYINT_ 269 | vdNearbyInt 270 | vdnearbyint_ 271 | vmdNearbyInt 272 | vmdnearbyint_ 273 | VDRINT_ 274 | VMDRINT_ 275 | vdRint 276 | vdrint_ 277 | vmdRint 278 | vmdrint_ 279 | VDROUND_ 280 | VMDROUND_ 281 | vdRound 282 | vdround_ 283 | vmdRound 284 | vmdround_ 285 | VDTRUNC_ 286 | VMDTRUNC_ 287 | vdTrunc 288 | vdtrunc_ 289 | vmdTrunc 290 | vmdtrunc_ 291 | VDABS_ 292 | VMDABS_ 293 | vdAbs 294 | vdabs_ 295 | vmdAbs 296 | vmdabs_ 297 | VDINV_ 298 | VMDINV_ 299 | vdInv 300 | vdinv_ 301 | vmdInv 302 | vmdinv_ 303 | VDSQRT_ 304 | VMDSQRT_ 305 | vdSqrt 306 | vdsqrt_ 307 | vmdSqrt 308 | vmdsqrt_ 309 | VDINVSQRT_ 310 | VMDINVSQRT_ 311 | vdInvSqrt 312 | vdinvsqrt_ 313 | vmdInvSqrt 314 | vmdinvsqrt_ 315 | VDCBRT_ 316 | VMDCBRT_ 317 | vdCbrt 318 | vdcbrt_ 319 | vmdCbrt 320 | vmdcbrt_ 321 | VDINVCBRT_ 322 | VMDINVCBRT_ 323 | vdInvCbrt 324 | vdinvcbrt_ 325 | vmdInvCbrt 326 | vmdinvcbrt_ 327 | VDEXP_ 328 | VMDEXP_ 329 | vdExp 330 | vdexp_ 331 | vmdExp 332 | vmdexp_ 333 | VDLN_ 334 | VMDLN_ 335 | vdLn 336 | vdln_ 337 | vmdLn 338 | vmdln_ 339 | VDLOG10_ 340 | VMDLOG10_ 341 | vdLog10 342 | vdlog10_ 343 | vmdLog10 344 | vmdlog10_ 345 | VDCOS_ 346 | VMDCOS_ 347 | vdCos 348 | vdcos_ 349 | vmdCos 350 | vmdcos_ 351 | VDSIN_ 352 | VMDSIN_ 353 | vdSin 354 | vdsin_ 355 | vmdSin 356 | vmdsin_ 357 | VDTAN_ 358 | VMDTAN_ 359 | vdTan 360 | vdtan_ 361 | vmdTan 362 | vmdtan_ 363 | VDACOS_ 364 | VMDACOS_ 365 | vdAcos 366 | vdacos_ 367 | vmdAcos 368 | vmdacos_ 369 | VDACOSH_ 370 | VMDACOSH_ 371 | vdAcosh 372 | vdacosh_ 373 | vmdAcosh 374 | vmdacosh_ 375 | VDASIN_ 376 | VMDASIN_ 377 | vdAsin 378 | vdasin_ 379 | vmdAsin 380 | vmdasin_ 381 | VDASINH_ 382 | VMDASINH_ 383 | vdAsinh 384 | vdasinh_ 385 | vmdAsinh 386 | vmdasinh_ 387 | VDATAN_ 388 | VMDATAN_ 389 | vdAtan 390 | vdatan_ 391 | vmdAtan 392 | vmdatan_ 393 | VDATANH_ 394 | VMDATANH_ 395 | vdAtanh 396 | vdatanh_ 397 | vmdAtanh 398 | vmdatanh_ 399 | VDCOSH_ 400 | VMDCOSH_ 401 | vdCosh 402 | vdcosh_ 403 | vmdCosh 404 | vmdcosh_ 405 | VDSINH_ 406 | VMDSINH_ 407 | vdSinh 408 | vdsinh_ 409 | vmdSinh 410 | vmdsinh_ 411 | VDTANH_ 412 | VMDTANH_ 413 | vdTanh 414 | vdtanh_ 415 | vmdTanh 416 | vmdtanh_ 417 | VDERF_ 418 | VMDERF_ 419 | vdErf 420 | vderf_ 421 | vmdErf 422 | vmderf_ 423 | VDERFC_ 424 | VMDERFC_ 425 | vdErfc 426 | vderfc_ 427 | vmdErfc 428 | vmderfc_ 429 | VDERFINV_ 430 | VMDERFINV_ 431 | vdErfInv 432 | vderfinv_ 433 | vmdErfInv 434 | vmderfinv_ 435 | VDSQR_ 436 | VMDSQR_ 437 | vdSqr 438 | vdsqr_ 439 | vmdSqr 440 | vmdsqr_ 441 | VDEXPM1_ 442 | VMDEXPM1_ 443 | vdExpm1 444 | vdexpm1_ 445 | vmdExpm1 446 | vmdexpm1_ 447 | VDLOG1P_ 448 | VMDLOG1P_ 449 | vdLog1p 450 | vdlog1p_ 451 | vmdLog1p 452 | vmdlog1p_ 453 | VDPOW3O2_ 454 | VMDPOW3O2_ 455 | vdPow3o2 456 | vdpow3o2_ 457 | vmdPow3o2 458 | vmdpow3o2_ 459 | VDPOW2O3_ 460 | VMDPOW2O3_ 461 | vdPow2o3 462 | vdpow2o3_ 463 | vmdPow2o3 464 | vmdpow2o3_ 465 | VDERFCINV_ 466 | VMDERFCINV_ 467 | vdErfcInv 468 | vderfcinv_ 469 | vmdErfcInv 470 | vmderfcinv_ 471 | VDCDFNORM_ 472 | VMDCDFNORM_ 473 | vdCdfNorm 474 | vdcdfnorm_ 475 | vmdCdfNorm 476 | vmdcdfnorm_ 477 | VDCDFNORMINV_ 478 | VMDCDFNORMINV_ 479 | vdCdfNormInv 480 | vdcdfnorminv_ 481 | vmdCdfNormInv 482 | vmdcdfnorminv_ 483 | VDLGAMMA_ 484 | VMDLGAMMA_ 485 | vdLGamma 486 | vdlgamma_ 487 | vmdLGamma 488 | vmdlgamma_ 489 | VDTGAMMA_ 490 | VMDTGAMMA_ 491 | vdTGamma 492 | vdtgamma_ 493 | vmdTGamma 494 | vmdtgamma_ 495 | VCCOS_ 496 | VMCCOS_ 497 | vcCos 498 | vccos_ 499 | vmcCos 500 | vmccos_ 501 | VCSIN_ 502 | VMCSIN_ 503 | vcSin 504 | vcsin_ 505 | vmcSin 506 | vmcsin_ 507 | VCTAN_ 508 | VMCTAN_ 509 | vcTan 510 | vctan_ 511 | vmcTan 512 | vmctan_ 513 | VCCOSH_ 514 | VMCCOSH_ 515 | vcCosh 516 | vccosh_ 517 | vmcCosh 518 | vmccosh_ 519 | VCSINH_ 520 | VMCSINH_ 521 | vcSinh 522 | vcsinh_ 523 | vmcSinh 524 | vmcsinh_ 525 | VCTANH_ 526 | VMCTANH_ 527 | vcTanh 528 | vctanh_ 529 | vmcTanh 530 | vmctanh_ 531 | VCACOS_ 532 | VMCACOS_ 533 | vcAcos 534 | vcacos_ 535 | vmcAcos 536 | vmcacos_ 537 | VCASIN_ 538 | VMCASIN_ 539 | vcAsin 540 | vcasin_ 541 | vmcAsin 542 | vmcasin_ 543 | VCATAN_ 544 | VMCATAN_ 545 | vcAtan 546 | vcatan_ 547 | vmcAtan 548 | vmcatan_ 549 | VCACOSH_ 550 | VMCACOSH_ 551 | vcAcosh 552 | vcacosh_ 553 | vmcAcosh 554 | vmcacosh_ 555 | VCASINH_ 556 | VMCASINH_ 557 | vcAsinh 558 | vcasinh_ 559 | vmcAsinh 560 | vmcasinh_ 561 | VCATANH_ 562 | VMCATANH_ 563 | vcAtanh 564 | vcatanh_ 565 | vmcAtanh 566 | vmcatanh_ 567 | VCEXP_ 568 | VMCEXP_ 569 | vcExp 570 | vcexp_ 571 | vmcExp 572 | vmcexp_ 573 | VCLN_ 574 | VMCLN_ 575 | vcLn 576 | vcln_ 577 | vmcLn 578 | vmcln_ 579 | VCLOG10_ 580 | VMCLOG10_ 581 | vcLog10 582 | vclog10_ 583 | vmcLog10 584 | vmclog10_ 585 | VCSQRT_ 586 | VMCSQRT_ 587 | vcSqrt 588 | vcsqrt_ 589 | vmcSqrt 590 | vmcsqrt_ 591 | VCCONJ_ 592 | VMCCONJ_ 593 | vcConj 594 | vcconj_ 595 | vmcConj 596 | vmcconj_ 597 | VMZCOS_ 598 | VZCOS_ 599 | vmzCos 600 | vmzcos_ 601 | vzCos 602 | vzcos_ 603 | VMZSIN_ 604 | VZSIN_ 605 | vmzSin 606 | vmzsin_ 607 | vzSin 608 | vzsin_ 609 | VMZTAN_ 610 | VZTAN_ 611 | vmzTan 612 | vmztan_ 613 | vzTan 614 | vztan_ 615 | VMZCOSH_ 616 | VZCOSH_ 617 | vmzCosh 618 | vmzcosh_ 619 | vzCosh 620 | vzcosh_ 621 | VMZSINH_ 622 | VZSINH_ 623 | vmzSinh 624 | vmzsinh_ 625 | vzSinh 626 | vzsinh_ 627 | VMZTANH_ 628 | VZTANH_ 629 | vmzTanh 630 | vmztanh_ 631 | vzTanh 632 | vztanh_ 633 | VMZACOS_ 634 | VZACOS_ 635 | vmzAcos 636 | vmzacos_ 637 | vzAcos 638 | vzacos_ 639 | VMZASIN_ 640 | VZASIN_ 641 | vmzAsin 642 | vmzasin_ 643 | vzAsin 644 | vzasin_ 645 | VMZATAN_ 646 | VZATAN_ 647 | vmzAtan 648 | vmzatan_ 649 | vzAtan 650 | vzatan_ 651 | VMZACOSH_ 652 | VZACOSH_ 653 | vmzAcosh 654 | vmzacosh_ 655 | vzAcosh 656 | vzacosh_ 657 | VMZASINH_ 658 | VZASINH_ 659 | vmzAsinh 660 | vmzasinh_ 661 | vzAsinh 662 | vzasinh_ 663 | VMZATANH_ 664 | VZATANH_ 665 | vmzAtanh 666 | vmzatanh_ 667 | vzAtanh 668 | vzatanh_ 669 | VMZEXP_ 670 | VZEXP_ 671 | vmzExp 672 | vmzexp_ 673 | vzExp 674 | vzexp_ 675 | VMZLN_ 676 | VZLN_ 677 | vmzLn 678 | vmzln_ 679 | vzLn 680 | vzln_ 681 | VMZLOG10_ 682 | VZLOG10_ 683 | vmzLog10 684 | vmzlog10_ 685 | vzLog10 686 | vzlog10_ 687 | VMZSQRT_ 688 | VZSQRT_ 689 | vmzSqrt 690 | vmzsqrt_ 691 | vzSqrt 692 | vzsqrt_ 693 | VMZCONJ_ 694 | VZCONJ_ 695 | vmzConj 696 | vmzconj_ 697 | vzConj 698 | vzconj_ 699 | VCCIS_ 700 | VMCCIS_ 701 | vcCIS 702 | vccis_ 703 | vmcCIS 704 | vmccis_ 705 | VMZCIS_ 706 | VZCIS_ 707 | vmzCIS 708 | vmzcis_ 709 | vzCIS 710 | vzcis_ 711 | VCABS_ 712 | VMCABS_ 713 | vcAbs 714 | vcabs_ 715 | vmcAbs 716 | vmcabs_ 717 | VCARG_ 718 | VMCARG_ 719 | vcArg 720 | vcarg_ 721 | vmcArg 722 | vmcarg_ 723 | VMZABS_ 724 | VZABS_ 725 | vmzAbs 726 | vmzabs_ 727 | vzAbs 728 | vzabs_ 729 | VMZARG_ 730 | VZARG_ 731 | vmzArg 732 | vmzarg_ 733 | vzArg 734 | vzarg_ 735 | VMSDIV_ 736 | VSDIV_ 737 | vmsDiv 738 | vmsdiv_ 739 | vsDiv 740 | vsdiv_ 741 | VMSPOW_ 742 | VSPOW_ 743 | vmsPow 744 | vmspow_ 745 | vsPow 746 | vspow_ 747 | VMSATAN2_ 748 | VSATAN2_ 749 | vmsAtan2 750 | vmsatan2_ 751 | vsAtan2 752 | vsatan2_ 753 | VMSHYPOT_ 754 | VSHYPOT_ 755 | vmsHypot 756 | vmshypot_ 757 | vsHypot 758 | vshypot_ 759 | VMSADD_ 760 | VSADD_ 761 | vmsAdd 762 | vmsadd_ 763 | vsAdd 764 | vsadd_ 765 | VMSSUB_ 766 | VSSUB_ 767 | vmsSub 768 | vmssub_ 769 | vsSub 770 | vssub_ 771 | VMSMUL_ 772 | VSMUL_ 773 | vmsMul 774 | vmsmul_ 775 | vsMul 776 | vsmul_ 777 | VDDIV_ 778 | VMDDIV_ 779 | vdDiv 780 | vddiv_ 781 | vmdDiv 782 | vmddiv_ 783 | VDPOW_ 784 | VMDPOW_ 785 | vdPow 786 | vdpow_ 787 | vmdPow 788 | vmdpow_ 789 | VDATAN2_ 790 | VMDATAN2_ 791 | vdAtan2 792 | vdatan2_ 793 | vmdAtan2 794 | vmdatan2_ 795 | VDHYPOT_ 796 | VMDHYPOT_ 797 | vdHypot 798 | vdhypot_ 799 | vmdHypot 800 | vmdhypot_ 801 | VDADD_ 802 | VMDADD_ 803 | vdAdd 804 | vdadd_ 805 | vmdAdd 806 | vmdadd_ 807 | VDSUB_ 808 | VMDSUB_ 809 | vdSub 810 | vdsub_ 811 | vmdSub 812 | vmdsub_ 813 | VDMUL_ 814 | VMDMUL_ 815 | vdMul 816 | vdmul_ 817 | vmdMul 818 | vmdmul_ 819 | VCDIV_ 820 | VMCDIV_ 821 | vcDiv 822 | vcdiv_ 823 | vmcDiv 824 | vmcdiv_ 825 | VCPOW_ 826 | VMCPOW_ 827 | vcPow 828 | vcpow_ 829 | vmcPow 830 | vmcpow_ 831 | VCADD_ 832 | VMCADD_ 833 | vcAdd 834 | vcadd_ 835 | vmcAdd 836 | vmcadd_ 837 | VCSUB_ 838 | VMCSUB_ 839 | vcSub 840 | vcsub_ 841 | vmcSub 842 | vmcsub_ 843 | VCMUL_ 844 | VMCMUL_ 845 | vcMul 846 | vcmul_ 847 | vmcMul 848 | vmcmul_ 849 | VCMULBYCONJ_ 850 | VMCMULBYCONJ_ 851 | vcMulByConj 852 | vcmulbyconj_ 853 | vmcMulByConj 854 | vmcmulbyconj_ 855 | VMZDIV_ 856 | VZDIV_ 857 | vmzDiv 858 | vmzdiv_ 859 | vzDiv 860 | vzdiv_ 861 | VMZPOW_ 862 | VZPOW_ 863 | vmzPow 864 | vmzpow_ 865 | vzPow 866 | vzpow_ 867 | VMZADD_ 868 | VZADD_ 869 | vmzAdd 870 | vmzadd_ 871 | vzAdd 872 | vzadd_ 873 | VMZSUB_ 874 | VZSUB_ 875 | vmzSub 876 | vmzsub_ 877 | vzSub 878 | vzsub_ 879 | VMZMUL_ 880 | VZMUL_ 881 | vmzMul 882 | vmzmul_ 883 | vzMul 884 | vzmul_ 885 | VMZMULBYCONJ_ 886 | VZMULBYCONJ_ 887 | vmzMulByConj 888 | vmzmulbyconj_ 889 | vzMulByConj 890 | vzmulbyconj_ 891 | VCPOWX_ 892 | VMCPOWX_ 893 | vcPowx 894 | vcpowx_ 895 | vmcPowx 896 | vmcpowx_ 897 | VMZPOWX_ 898 | VZPOWX_ 899 | vmzPowx 900 | vmzpowx_ 901 | vzPowx 902 | vzpowx_ 903 | VMSPOWX_ 904 | VSPOWX_ 905 | vmsPowx 906 | vmspowx_ 907 | vsPowx 908 | vspowx_ 909 | VDPOWX_ 910 | VMDPOWX_ 911 | vdPowx 912 | vdpowx_ 913 | vmdPowx 914 | vmdpowx_ 915 | VMSSINCOS_ 916 | VSSINCOS_ 917 | vmsSinCos 918 | vmssincos_ 919 | vsSinCos 920 | vssincos_ 921 | VMSMODF_ 922 | VSMODF_ 923 | vmsModf 924 | vmsmodf_ 925 | vsModf 926 | vsmodf_ 927 | VDSINCOS_ 928 | VMDSINCOS_ 929 | vdSinCos 930 | vdsincos_ 931 | vmdSinCos 932 | vmdsincos_ 933 | VDMODF_ 934 | VMDMODF_ 935 | vdModf 936 | vdmodf_ 937 | vmdModf 938 | vmdmodf_ 939 | VMSLINEARFRAC_ 940 | VSLINEARFRAC_ 941 | vmsLinearFrac 942 | vmslinearfrac_ 943 | vsLinearFrac 944 | vslinearfrac_ 945 | VDLINEARFRAC_ 946 | VMDLINEARFRAC_ 947 | vdLinearFrac 948 | vdlinearfrac_ 949 | vmdLinearFrac 950 | vmdlinearfrac_ 951 | VMSPACKI_ 952 | VSPACKI_ 953 | vmsPackI 954 | vmspacki_ 955 | vsPackI 956 | vspacki_ 957 | VDPACKI_ 958 | VMDPACKI_ 959 | vdPackI 960 | vdpacki_ 961 | vmdPackI 962 | vmdpacki_ 963 | VCPACKI_ 964 | VMCPACKI_ 965 | vcPackI 966 | vcpacki_ 967 | vmcPackI 968 | vmcpacki_ 969 | VMZPACKI_ 970 | VZPACKI_ 971 | vmzPackI 972 | vmzpacki_ 973 | vzPackI 974 | vzpacki_ 975 | VMSPACKM_ 976 | VSPACKM_ 977 | vmsPackM 978 | vmspackm_ 979 | vsPackM 980 | vspackm_ 981 | VDPACKM_ 982 | VMDPACKM_ 983 | vdPackM 984 | vdpackm_ 985 | vmdPackM 986 | vmdpackm_ 987 | VCPACKM_ 988 | VMCPACKM_ 989 | vcPackM 990 | vcpackm_ 991 | vmcPackM 992 | vmcpackm_ 993 | VMZPACKM_ 994 | VZPACKM_ 995 | vmzPackM 996 | vmzpackm_ 997 | vzPackM 998 | vzpackm_ 999 | VMSPACKV_ 1000 | VSPACKV_ 1001 | vmsPackV 1002 | vmspackv_ 1003 | vsPackV 1004 | vspackv_ 1005 | VDPACKV_ 1006 | VMDPACKV_ 1007 | vdPackV 1008 | vdpackv_ 1009 | vmdPackV 1010 | vmdpackv_ 1011 | VCPACKV_ 1012 | VMCPACKV_ 1013 | vcPackV 1014 | vcpackv_ 1015 | vmcPackV 1016 | vmcpackv_ 1017 | VMZPACKV_ 1018 | VZPACKV_ 1019 | vmzPackV 1020 | vmzpackv_ 1021 | vzPackV 1022 | vzpackv_ 1023 | VMSUNPACKI_ 1024 | VSUNPACKI_ 1025 | vmsUnpackI 1026 | vmsunpacki_ 1027 | vsUnpackI 1028 | vsunpacki_ 1029 | VDUNPACKI_ 1030 | VMDUNPACKI_ 1031 | vdUnpackI 1032 | vdunpacki_ 1033 | vmdUnpackI 1034 | vmdunpacki_ 1035 | VCUNPACKI_ 1036 | VMCUNPACKI_ 1037 | vcUnpackI 1038 | vcunpacki_ 1039 | vmcUnpackI 1040 | vmcunpacki_ 1041 | VMZUNPACKI_ 1042 | VZUNPACKI_ 1043 | vmzUnpackI 1044 | vmzunpacki_ 1045 | vzUnpackI 1046 | vzunpacki_ 1047 | VMSUNPACKM_ 1048 | VSUNPACKM_ 1049 | vmsUnpackM 1050 | vmsunpackm_ 1051 | vsUnpackM 1052 | vsunpackm_ 1053 | VDUNPACKM_ 1054 | VMDUNPACKM_ 1055 | vdUnpackM 1056 | vdunpackm_ 1057 | vmdUnpackM 1058 | vmdunpackm_ 1059 | VCUNPACKM_ 1060 | VMCUNPACKM_ 1061 | vcUnpackM 1062 | vcunpackm_ 1063 | vmcUnpackM 1064 | vmcunpackm_ 1065 | VMZUNPACKM_ 1066 | VZUNPACKM_ 1067 | vmzUnpackM 1068 | vmzunpackm_ 1069 | vzUnpackM 1070 | vzunpackm_ 1071 | VMSUNPACKV_ 1072 | VSUNPACKV_ 1073 | vmsUnpackV 1074 | vmsunpackv_ 1075 | vsUnpackV 1076 | vsunpackv_ 1077 | VDUNPACKV_ 1078 | VMDUNPACKV_ 1079 | vdUnpackV 1080 | vdunpackv_ 1081 | vmdUnpackV 1082 | vmdunpackv_ 1083 | VCUNPACKV_ 1084 | VMCUNPACKV_ 1085 | vcUnpackV 1086 | vcunpackv_ 1087 | vmcUnpackV 1088 | vmcunpackv_ 1089 | VMZUNPACKV_ 1090 | VZUNPACKV_ 1091 | vmzUnpackV 1092 | vmzunpackv_ 1093 | vzUnpackV 1094 | vzunpackv_ 1095 | VMLCLEARERRORCALLBACK_ 1096 | VMLCLEARERRSTATUS_ 1097 | VMLGETERRORCALLBACK_ 1098 | VMLGETERRSTATUS_ 1099 | VMLSETERRORCALLBACK_ 1100 | VMLSETERRSTATUS_ 1101 | vmlClearErrStatus 1102 | vmlClearErrorCallBack 1103 | vmlGetErrStatus 1104 | vmlGetErrorCallBack 1105 | vmlSetErrStatus 1106 | vmlSetErrorCallBack 1107 | vmlclearerrorcallback_ 1108 | vmlclearerrstatus_ 1109 | vmlgeterrorcallback_ 1110 | vmlgeterrstatus_ 1111 | vmlseterrorcallback_ 1112 | vmlseterrstatus_ 1113 | VMLGETMODE_ 1114 | VMLSETMODE_ 1115 | vmlGetMode 1116 | vmlSetMode 1117 | vmlgetmode_ 1118 | vmlsetmode_ 1119 | VDRNGCAUCHY_ 1120 | vdRngCauchy 1121 | vdrngcauchy_ 1122 | VSRNGCAUCHY_ 1123 | vsRngCauchy 1124 | vsrngcauchy_ 1125 | VDRNGEXPONENTIAL_ 1126 | vdRngExponential 1127 | vdrngexponential_ 1128 | VSRNGEXPONENTIAL_ 1129 | vsRngExponential 1130 | vsrngexponential_ 1131 | VDRNGGAUSSIAN_ 1132 | vdRngGaussian 1133 | vdrnggaussian_ 1134 | VSRNGGAUSSIAN_ 1135 | vsRngGaussian 1136 | vsrnggaussian_ 1137 | VDRNGGAUSSIANMV_ 1138 | vdRngGaussianMV 1139 | vdrnggaussianmv_ 1140 | VSRNGGAUSSIANMV_ 1141 | vsRngGaussianMV 1142 | vsrnggaussianmv_ 1143 | VDRNGGUMBEL_ 1144 | vdRngGumbel 1145 | vdrnggumbel_ 1146 | VSRNGGUMBEL_ 1147 | vsRngGumbel 1148 | vsrnggumbel_ 1149 | VDRNGLAPLACE_ 1150 | vdRngLaplace 1151 | vdrnglaplace_ 1152 | VSRNGLAPLACE_ 1153 | vsRngLaplace 1154 | vsrnglaplace_ 1155 | VDRNGLOGNORMAL_ 1156 | vdRngLognormal 1157 | vdrnglognormal_ 1158 | VSRNGLOGNORMAL_ 1159 | vsRngLognormal 1160 | vsrnglognormal_ 1161 | VDRNGRAYLEIGH_ 1162 | vdRngRayleigh 1163 | vdrngrayleigh_ 1164 | VSRNGRAYLEIGH_ 1165 | vsRngRayleigh 1166 | vsrngrayleigh_ 1167 | VDRNGUNIFORM_ 1168 | vdRngUniform 1169 | vdrnguniform_ 1170 | VSRNGUNIFORM_ 1171 | vsRngUniform 1172 | vsrnguniform_ 1173 | VDRNGWEIBULL_ 1174 | vdRngWeibull 1175 | vdrngweibull_ 1176 | VSRNGWEIBULL_ 1177 | vsRngWeibull 1178 | vsrngweibull_ 1179 | VDRNGBETA_ 1180 | vdRngBeta 1181 | vdrngbeta_ 1182 | VSRNGBETA_ 1183 | vsRngBeta 1184 | vsrngbeta_ 1185 | VDRNGGAMMA_ 1186 | vdRngGamma 1187 | vdrnggamma_ 1188 | VSRNGGAMMA_ 1189 | vsRngGamma 1190 | vsrnggamma_ 1191 | VIRNGBERNOULLI_ 1192 | viRngBernoulli 1193 | virngbernoulli_ 1194 | VIRNGBINOMIAL_ 1195 | viRngBinomial 1196 | virngbinomial_ 1197 | VIRNGGEOMETRIC_ 1198 | viRngGeometric 1199 | virnggeometric_ 1200 | VIRNGHYPERGEOMETRIC_ 1201 | viRngHypergeometric 1202 | virnghypergeometric_ 1203 | VIRNGNEGBINOMIAL_ 1204 | viRngNegBinomial 1205 | viRngNegbinomial 1206 | virngnegbinomial_ 1207 | VIRNGPOISSON_ 1208 | viRngPoisson 1209 | virngpoisson_ 1210 | VIRNGPOISSONV_ 1211 | viRngPoissonV 1212 | virngpoissonv_ 1213 | VIRNGUNIFORM_ 1214 | viRngUniform 1215 | virnguniform_ 1216 | VIRNGUNIFORMBITS_ 1217 | viRngUniformBits 1218 | virnguniformbits_ 1219 | VIRNGUNIFORMBITS32_ 1220 | viRngUniformBits32 1221 | virnguniformbits32_ 1222 | VIRNGUNIFORMBITS64_ 1223 | viRngUniformBits64 1224 | virnguniformbits64_ 1225 | VSLCOPYSTREAMSTATE_ 1226 | VSLCOPYSTREAM_ 1227 | VSLDELETESTREAM_ 1228 | VSLDNEWABSTRACTSTREAM_ 1229 | VSLGETSTREAMSTATEBRNG_ 1230 | VSLINEWABSTRACTSTREAM_ 1231 | VSLLEAPFROGSTREAM_ 1232 | VSLNEWSTREAMEX_ 1233 | VSLNEWSTREAM_ 1234 | VSLSKIPAHEADSTREAM_ 1235 | VSLSNEWABSTRACTSTREAM_ 1236 | vslCopyStream 1237 | vslCopyStreamState 1238 | vslDeleteStream 1239 | vslGetStreamStateBrng 1240 | vslLeapfrogStream 1241 | vslNewStream 1242 | vslNewStreamEx 1243 | vslSkipAheadStream 1244 | vslcopystream_ 1245 | vslcopystreamstate_ 1246 | vsldNewAbstractStream 1247 | vsldeletestream_ 1248 | vsldnewabstractstream_ 1249 | vslgetstreamstatebrng_ 1250 | vsliNewAbstractStream 1251 | vslinewabstractstream_ 1252 | vslleapfrogstream_ 1253 | vslnewstream_ 1254 | vslnewstreamex_ 1255 | vslsNewAbstractStream 1256 | vslskipaheadstream_ 1257 | vslsnewabstractstream_ 1258 | VSLGETBRNGPROPERTIES_ 1259 | VSLGETNUMREGBRNGS_ 1260 | VSLREGISTERBRNG_ 1261 | vslGetBrngProperties 1262 | vslGetNumRegBrngs 1263 | vslRegisterBrng 1264 | vslgetbrngproperties_ 1265 | vslgetnumregbrngs_ 1266 | vslregisterbrng_ 1267 | VSLDSSCOMPUTE_ 1268 | vsldSSCompute 1269 | vsldsscompute_ 1270 | VSLDSSEDITCOVCOR_ 1271 | vsldSSEditCovCor 1272 | vsldsseditcovcor_ 1273 | VSLDSSEDITMISSINGVALUES_ 1274 | vsldSSEditMissingValues 1275 | vsldsseditmissingvalues_ 1276 | VSLDSSEDITMOMENTS_ 1277 | vsldSSEditMoments 1278 | vsldsseditmoments_ 1279 | VSLDSSEDITCORPARAMETERIZATION_ 1280 | vsldSSEditCorParameterization 1281 | vsldsseditcorparameterization_ 1282 | VSLDSSEDITOUTLIERSDETECTION_ 1283 | vsldSSEditOutliersDetection 1284 | vsldsseditoutliersdetection_ 1285 | VSLDSSEDITPOOLEDCOVARIANCE_ 1286 | vsldSSEditPooledCovariance 1287 | vsldsseditpooledcovariance_ 1288 | VSLDSSEDITPARTIALCOVCOR_ 1289 | vsldSSEditPartialCovCor 1290 | vsldsseditpartialcovcor_ 1291 | VSLDSSEDITQUANTILES_ 1292 | vsldSSEditQuantiles 1293 | vsldsseditquantiles_ 1294 | VSLDSSEDITROBUSTCOVARIANCE_ 1295 | vsldSSEditRobustCovariance 1296 | vsldsseditrobustcovariance_ 1297 | VSLDSSEDITSTREAMQUANTILES_ 1298 | vsldSSEditStreamQuantiles 1299 | vsldsseditstreamquantiles_ 1300 | VSLDSSEDITTASK_ 1301 | vsldSSEditTask 1302 | vsldssedittask_ 1303 | VSLSSDELETETASK_ 1304 | vslSSDeleteTask 1305 | vslssdeletetask_ 1306 | VSLDSSNEWTASK_ 1307 | vsldSSNewTask 1308 | vsldssnewtask_ 1309 | VSLISSEDITTASK_ 1310 | vsliSSEditTask 1311 | vslissedittask_ 1312 | VSLSSSCOMPUTE_ 1313 | vslsSSCompute 1314 | vslssscompute_ 1315 | VSLSSSEDITCOVCOR_ 1316 | vslsSSEditCovCor 1317 | vslssseditcovcor_ 1318 | VSLSSSEDITMISSINGVALUES_ 1319 | vslsSSEditMissingValues 1320 | vslssseditmissingvalues_ 1321 | VSLSSSEDITMOMENTS_ 1322 | vslsSSEditMoments 1323 | vslssseditmoments_ 1324 | VSLSSSEDITCORPARAMETERIZATION_ 1325 | vslsSSEditCorParameterization 1326 | vslssseditcorparameterization_ 1327 | VSLSSSEDITOUTLIERSDETECTION_ 1328 | vslsSSEditOutliersDetection 1329 | vslssseditoutliersdetection_ 1330 | VSLSSSEDITPOOLEDCOVARIANCE_ 1331 | vslsSSEditPooledCovariance 1332 | vslssseditpooledcovariance_ 1333 | VSLSSSEDITPARTIALCOVCOR_ 1334 | vslsSSEditPartialCovCor 1335 | vslssseditpartialcovcor_ 1336 | VSLSSSEDITQUANTILES_ 1337 | vslsSSEditQuantiles 1338 | vslssseditquantiles_ 1339 | VSLSSSEDITROBUSTCOVARIANCE_ 1340 | vslsSSEditRobustCovariance 1341 | vslssseditrobustcovariance_ 1342 | VSLSSSEDITSTREAMQUANTILES_ 1343 | vslsSSEditStreamQuantiles 1344 | vslssseditstreamquantiles_ 1345 | VSLSSSEDITTASK_ 1346 | vslsSSEditTask 1347 | vslsssedittask_ 1348 | VSLSSSNEWTASK_ 1349 | vslsSSNewTask 1350 | vslsssnewtask_ 1351 | VSLGETSTREAMSIZE_ 1352 | VSLLOADSTREAMF_ 1353 | VSLLOADSTREAMM_ 1354 | VSLSAVESTREAMF_ 1355 | VSLSAVESTREAMM_ 1356 | vslGetStreamSize 1357 | vslLoadStreamF 1358 | vslLoadStreamM 1359 | vslSaveStreamF 1360 | vslSaveStreamM 1361 | vslgetstreamsize_ 1362 | vslloadstreamf_ 1363 | vslloadstreamm_ 1364 | vslsavestreamf_ 1365 | vslsavestreamm_ 1366 | -------------------------------------------------------------------------------- /Sources/SwiftyMKL/Vector-impl.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import BaseMath 3 | import CIPL 4 | 5 | 6 | extension Vector { 7 | @inlinable public func dot(_ incX:Int, _ Y:Self, _ incY:Int)->Element {return Element.dot(self.c,self.p,incX,Y.p,incY)} 8 | @inlinable public func doti(_ indx:UnsafePointer, _ Y:Self)->Element {return Element.doti(self.c,self.p,indx,Y.p)} 9 | @inlinable public func nrm2(_ incX:Int)->Element {return Element.nrm2(self.c,self.p,incX)} 10 | @inlinable public func asum(_ incX:Int)->Element {return Element.asum(self.c,self.p,incX)} 11 | @inlinable public func swap(_ X:Self, _ incX:Int, _ Y:Self, _ incY:Int) {return Element.swap(self.c,X.p,incX,Y.p,incY)} 12 | @inlinable public func copy(_ incX:Int, _ Y:Self, _ incY:Int) {return Element.copy(self.c,self.p,incX,Y.p,incY)} 13 | @inlinable public func axpy(_ alpha:Element, _ incX:Int, _ Y:Self, _ incY:Int) {return Element.axpy(self.c,alpha,self.p,incX,Y.p,incY)} 14 | @inlinable public func axpby(_ alpha:Element, _ incX:Int, _ beta:Element, _ Y:Self, _ incY:Int) {return Element.axpby(self.c,alpha,self.p,incX,beta,Y.p,incY)} 15 | @inlinable public func axpyi(_ alpha:Element, _ indx:UnsafePointer, _ Y:Self) {return Element.axpyi(self.c,alpha,self.p,indx,Y.p)} 16 | @inlinable public func gthr(_ Y:Self, _ X:Self, _ indx:UnsafePointer) {return Element.gthr(self.c,Y.p,X.p,indx)} 17 | @inlinable public func gthrz(_ Y:Self, _ X:Self, _ indx:UnsafePointer) {return Element.gthrz(self.c,Y.p,X.p,indx)} 18 | @inlinable public func sctr(_ indx:UnsafePointer, _ Y:Self) {return Element.sctr(self.c,self.p,indx,Y.p)} 19 | 20 | 21 | @inlinable public func rot(_ X:Self, _ incX:Int, _ Y:Self, _ incY:Int, _ c:Element, _ s:Element) {return Element.rot(self.c,X.p,incX,Y.p,incY,c,s)} 22 | @inlinable public func roti(_ X:Self, _ indx:UnsafePointer, _ Y:Self, _ c:Element, _ s:Element) {return Element.roti(self.c,X.p,indx,Y.p,c,s)} 23 | @inlinable public func rotm(_ X:Self, _ incX:Int, _ Y:Self, _ incY:Int, _ P:Self) {return Element.rotm(self.c,X.p,incX,Y.p,incY,P.p)} 24 | @inlinable public func scal(_ alpha:Element, _ X:Self, _ incX:Int) {return Element.scal(self.c,alpha,X.p,incX)} 25 | @inlinable public func gemv(_ Layout:CBLAS_LAYOUT, _ TransA:CBLAS_TRANSPOSE, _ M:Int, _ alpha:Element, _ A:Self, _ lda:Int, _ incX:Int, _ beta:Element, _ Y:Self, _ incY:Int) {return Element.gemv(Layout,TransA,M,self.c,alpha,A.p,lda,self.p,incX,beta,Y.p,incY)} 26 | @inlinable public func gbmv(_ Layout:CBLAS_LAYOUT, _ TransA:CBLAS_TRANSPOSE, _ M:Int, _ KL:Int, _ KU:Int, _ alpha:Element, _ A:Self, _ lda:Int, _ incX:Int, _ beta:Element, _ Y:Self, _ incY:Int) {return Element.gbmv(Layout,TransA,M,self.c,KL,KU,alpha,A.p,lda,self.p,incX,beta,Y.p,incY)} 27 | @inlinable public func trmv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ lda:Int, _ X:Self, _ incX:Int) {return Element.trmv(Layout,Uplo,TransA,Diag,self.c,self.p,lda,X.p,incX)} 28 | @inlinable public func tbmv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ K:Int, _ lda:Int, _ X:Self, _ incX:Int) {return Element.tbmv(Layout,Uplo,TransA,Diag,self.c,K,self.p,lda,X.p,incX)} 29 | @inlinable public func tpmv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ Ap:Self, _ X:Self, _ incX:Int) {return Element.tpmv(Layout,Uplo,TransA,Diag,self.c,Ap.p,X.p,incX)} 30 | @inlinable public func trsv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ lda:Int, _ X:Self, _ incX:Int) {return Element.trsv(Layout,Uplo,TransA,Diag,self.c,self.p,lda,X.p,incX)} 31 | @inlinable public func tbsv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ K:Int, _ lda:Int, _ X:Self, _ incX:Int) {return Element.tbsv(Layout,Uplo,TransA,Diag,self.c,K,self.p,lda,X.p,incX)} 32 | @inlinable public func tpsv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ Ap:Self, _ X:Self, _ incX:Int) {return Element.tpsv(Layout,Uplo,TransA,Diag,self.c,Ap.p,X.p,incX)} 33 | @inlinable public func symv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ alpha:Element, _ A:Self, _ lda:Int, _ incX:Int, _ beta:Element, _ Y:Self, _ incY:Int) {return Element.symv(Layout,Uplo,self.c,alpha,A.p,lda,self.p,incX,beta,Y.p,incY)} 34 | @inlinable public func sbmv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ K:Int, _ alpha:Element, _ A:Self, _ lda:Int, _ incX:Int, _ beta:Element, _ Y:Self, _ incY:Int) {return Element.sbmv(Layout,Uplo,self.c,K,alpha,A.p,lda,self.p,incX,beta,Y.p,incY)} 35 | @inlinable public func spmv(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ alpha:Element, _ Ap:Self, _ incX:Int, _ beta:Element, _ Y:Self, _ incY:Int) {return Element.spmv(Layout,Uplo,self.c,alpha,Ap.p,self.p,incX,beta,Y.p,incY)} 36 | @inlinable public func ger(_ Layout:CBLAS_LAYOUT, _ M:Int, _ alpha:Element, _ incX:Int, _ Y:Self, _ incY:Int, _ A:Self, _ lda:Int) {return Element.ger(Layout,M,self.c,alpha,self.p,incX,Y.p,incY,A.p,lda)} 37 | @inlinable public func syr(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ alpha:Element, _ incX:Int, _ A:Self, _ lda:Int) {return Element.syr(Layout,Uplo,self.c,alpha,self.p,incX,A.p,lda)} 38 | @inlinable public func spr(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ alpha:Element, _ incX:Int, _ Ap:Self) {return Element.spr(Layout,Uplo,self.c,alpha,self.p,incX,Ap.p)} 39 | @inlinable public func syr2(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ alpha:Element, _ incX:Int, _ Y:Self, _ incY:Int, _ A:Self, _ lda:Int) {return Element.syr2(Layout,Uplo,self.c,alpha,self.p,incX,Y.p,incY,A.p,lda)} 40 | @inlinable public func spr2(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ alpha:Element, _ incX:Int, _ Y:Self, _ incY:Int, _ A:Self) {return Element.spr2(Layout,Uplo,self.c,alpha,self.p,incX,Y.p,incY,A.p)} 41 | @inlinable public func gemm(_ Layout:CBLAS_LAYOUT, _ TransA:CBLAS_TRANSPOSE, _ TransB:CBLAS_TRANSPOSE, _ M:Int, _ K:Int, _ alpha:Element, _ lda:Int, _ B:Self, _ ldb:Int, _ beta:Element, _ C:Self, _ ldc:Int) {return Element.gemm(Layout,TransA,TransB,M,self.c,K,alpha,self.p,lda,B.p,ldb,beta,C.p,ldc)} 42 | @inlinable public func gemmt(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ TransB:CBLAS_TRANSPOSE, _ K:Int, _ alpha:Element, _ lda:Int, _ B:Self, _ ldb:Int, _ beta:Element, _ C:Self, _ ldc:Int) {return Element.gemmt(Layout,Uplo,TransA,TransB,self.c,K,alpha,self.p,lda,B.p,ldb,beta,C.p,ldc)} 43 | @inlinable public func symm(_ Layout:CBLAS_LAYOUT, _ Side:CBLAS_SIDE, _ Uplo:CBLAS_UPLO, _ M:Int, _ alpha:Element, _ lda:Int, _ B:Self, _ ldb:Int, _ beta:Element, _ C:Self, _ ldc:Int) {return Element.symm(Layout,Side,Uplo,M,self.c,alpha,self.p,lda,B.p,ldb,beta,C.p,ldc)} 44 | @inlinable public func syrk(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ Trans:CBLAS_TRANSPOSE, _ K:Int, _ alpha:Element, _ lda:Int, _ beta:Element, _ C:Self, _ ldc:Int) {return Element.syrk(Layout,Uplo,Trans,self.c,K,alpha,self.p,lda,beta,C.p,ldc)} 45 | @inlinable public func syr2k(_ Layout:CBLAS_LAYOUT, _ Uplo:CBLAS_UPLO, _ Trans:CBLAS_TRANSPOSE, _ K:Int, _ alpha:Element, _ lda:Int, _ B:Self, _ ldb:Int, _ beta:Element, _ C:Self, _ ldc:Int) {return Element.syr2k(Layout,Uplo,Trans,self.c,K,alpha,self.p,lda,B.p,ldb,beta,C.p,ldc)} 46 | @inlinable public func trmm(_ Layout:CBLAS_LAYOUT, _ Side:CBLAS_SIDE, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ M:Int, _ alpha:Element, _ lda:Int, _ B:Self, _ ldb:Int) {return Element.trmm(Layout,Side,Uplo,TransA,Diag,M,self.c,alpha,self.p,lda,B.p,ldb)} 47 | @inlinable public func trsm(_ Layout:CBLAS_LAYOUT, _ Side:CBLAS_SIDE, _ Uplo:CBLAS_UPLO, _ TransA:CBLAS_TRANSPOSE, _ Diag:CBLAS_DIAG, _ M:Int, _ alpha:Element, _ lda:Int, _ B:Self, _ ldb:Int) {return Element.trsm(Layout,Side,Uplo,TransA,Diag,M,self.c,alpha,self.p,lda,B.p,ldb)} 48 | @inlinable public func gemm_pack_get_size(_ identifier:CBLAS_IDENTIFIER, _ M:Int, _ K:Int)->Int32 {return Element.gemm_pack_get_size(identifier,M,self.c,K)} 49 | @inlinable public func gemm_pack(_ Layout:CBLAS_LAYOUT, _ identifier:CBLAS_IDENTIFIER, _ Trans:CBLAS_TRANSPOSE, _ M:Int, _ K:Int, _ alpha:Element, _ src:Self, _ ld:Int, _ dest:Self) {return Element.gemm_pack(Layout,identifier,Trans,M,self.c,K,alpha,src.p,ld,dest.p)} 50 | @inlinable public func gemm_compute(_ Layout:CBLAS_LAYOUT, _ TransA:Int, _ TransB:Int, _ M:Int, _ K:Int, _ lda:Int, _ B:Self, _ ldb:Int, _ beta:Element, _ C:Self, _ ldc:Int) {return Element.gemm_compute(Layout,TransA,TransB,M,self.c,K,self.p,lda,B.p,ldb,beta,C.p,ldc)} 51 | 52 | @inlinable public func abs(_ r:Self) {return Element.abs(self.c,self.p,r.p)} 53 | @inlinable public func inv(_ r:Self) {return Element.inv(self.c,self.p,r.p)} 54 | @inlinable public func sqrt(_ r:Self) {return Element.sqrt(self.c,self.p,r.p)} 55 | @inlinable public func invSqrt(_ r:Self) {return Element.invSqrt(self.c,self.p,r.p)} 56 | @inlinable public func cbrt(_ r:Self) {return Element.cbrt(self.c,self.p,r.p)} 57 | @inlinable public func invCbrt(_ r:Self) {return Element.invCbrt(self.c,self.p,r.p)} 58 | @inlinable public func sqr(_ r:Self) {return Element.sqr(self.c,self.p,r.p)} 59 | @inlinable public func exp(_ r:Self) {return Element.exp(self.c,self.p,r.p)} 60 | @inlinable public func exp2(_ r:Self) {return Element.exp2(self.c,self.p,r.p)} 61 | @inlinable public func exp10(_ r:Self) {return Element.exp10(self.c,self.p,r.p)} 62 | @inlinable public func expm1(_ r:Self) {return Element.expm1(self.c,self.p,r.p)} 63 | @inlinable public func ln(_ r:Self) {return Element.ln(self.c,self.p,r.p)} 64 | @inlinable public func log2(_ r:Self) {return Element.log2(self.c,self.p,r.p)} 65 | @inlinable public func log10(_ r:Self) {return Element.log10(self.c,self.p,r.p)} 66 | @inlinable public func log1p(_ r:Self) {return Element.log1p(self.c,self.p,r.p)} 67 | @inlinable public func logb(_ r:Self) {return Element.logb(self.c,self.p,r.p)} 68 | @inlinable public func cos(_ r:Self) {return Element.cos(self.c,self.p,r.p)} 69 | @inlinable public func sin(_ r:Self) {return Element.sin(self.c,self.p,r.p)} 70 | @inlinable public func tan(_ r:Self) {return Element.tan(self.c,self.p,r.p)} 71 | @inlinable public func cospi(_ r:Self) {return Element.cospi(self.c,self.p,r.p)} 72 | @inlinable public func sinpi(_ r:Self) {return Element.sinpi(self.c,self.p,r.p)} 73 | @inlinable public func tanpi(_ r:Self) {return Element.tanpi(self.c,self.p,r.p)} 74 | @inlinable public func cosd(_ r:Self) {return Element.cosd(self.c,self.p,r.p)} 75 | @inlinable public func sind(_ r:Self) {return Element.sind(self.c,self.p,r.p)} 76 | @inlinable public func tand(_ r:Self) {return Element.tand(self.c,self.p,r.p)} 77 | @inlinable public func cosh(_ r:Self) {return Element.cosh(self.c,self.p,r.p)} 78 | @inlinable public func sinh(_ r:Self) {return Element.sinh(self.c,self.p,r.p)} 79 | @inlinable public func tanh(_ r:Self) {return Element.tanh(self.c,self.p,r.p)} 80 | @inlinable public func acos(_ r:Self) {return Element.acos(self.c,self.p,r.p)} 81 | @inlinable public func asin(_ r:Self) {return Element.asin(self.c,self.p,r.p)} 82 | @inlinable public func atan(_ r:Self) {return Element.atan(self.c,self.p,r.p)} 83 | @inlinable public func acospi(_ r:Self) {return Element.acospi(self.c,self.p,r.p)} 84 | @inlinable public func asinpi(_ r:Self) {return Element.asinpi(self.c,self.p,r.p)} 85 | @inlinable public func atanpi(_ r:Self) {return Element.atanpi(self.c,self.p,r.p)} 86 | @inlinable public func acosh(_ r:Self) {return Element.acosh(self.c,self.p,r.p)} 87 | @inlinable public func asinh(_ r:Self) {return Element.asinh(self.c,self.p,r.p)} 88 | @inlinable public func atanh(_ r:Self) {return Element.atanh(self.c,self.p,r.p)} 89 | @inlinable public func erf(_ r:Self) {return Element.erf(self.c,self.p,r.p)} 90 | @inlinable public func erfInv(_ r:Self) {return Element.erfInv(self.c,self.p,r.p)} 91 | @inlinable public func hypot(_ b:Self, _ r:Self) {return Element.hypot(self.c,self.p,b.p,r.p)} 92 | @inlinable public func erfc(_ r:Self) {return Element.erfc(self.c,self.p,r.p)} 93 | @inlinable public func erfcInv(_ r:Self) {return Element.erfcInv(self.c,self.p,r.p)} 94 | @inlinable public func cdfNorm(_ r:Self) {return Element.cdfNorm(self.c,self.p,r.p)} 95 | @inlinable public func cdfNormInv(_ r:Self) {return Element.cdfNormInv(self.c,self.p,r.p)} 96 | @inlinable public func lGamma(_ r:Self) {return Element.lGamma(self.c,self.p,r.p)} 97 | @inlinable public func tGamma(_ r:Self) {return Element.tGamma(self.c,self.p,r.p)} 98 | @inlinable public func atan2(_ b:Self, _ r:Self) {return Element.atan2(self.c,self.p,b.p,r.p)} 99 | @inlinable public func atan2pi(_ b:Self, _ r:Self) {return Element.atan2pi(self.c,self.p,b.p,r.p)} 100 | @inlinable public func pow(_ b:Self, _ r:Self) {return Element.pow(self.c,self.p,b.p,r.p)} 101 | @inlinable public func pow3o2(_ r:Self) {return Element.pow3o2(self.c,self.p,r.p)} 102 | @inlinable public func pow2o3(_ r:Self) {return Element.pow2o3(self.c,self.p,r.p)} 103 | @inlinable public func powx(_ b:Element, _ r:Self) {return Element.powx(self.c,self.p,b,r.p)} 104 | @inlinable public func powr(_ b:Self, _ r:Self) {return Element.powr(self.c,self.p,b.p,r.p)} 105 | @inlinable public func sinCos(_ r1:Self, _ r2:Self) {return Element.sinCos(self.c,self.p,r1.p,r2.p)} 106 | @inlinable public func linearFrac(_ b:Self, _ scalea:Element, _ shifta:Element, _ scaleb:Element, _ shiftb:Element, _ r:Self) {return Element.linearFrac(self.c,self.p,b.p,scalea,shifta,scaleb,shiftb,r.p)} 107 | @inlinable public func ceil(_ r:Self) {return Element.ceil(self.c,self.p,r.p)} 108 | @inlinable public func floor(_ r:Self) {return Element.floor(self.c,self.p,r.p)} 109 | @inlinable public func frac(_ r:Self) {return Element.frac(self.c,self.p,r.p)} 110 | @inlinable public func modf(_ r1:Self, _ r2:Self) {return Element.modf(self.c,self.p,r1.p,r2.p)} 111 | @inlinable public func fmod(_ r1:Self, _ r2:Self) {return Element.fmod(self.c,self.p,r1.p,r2.p)} 112 | @inlinable public func remainder(_ r1:Self, _ r2:Self) {return Element.remainder(self.c,self.p,r1.p,r2.p)} 113 | @inlinable public func nextAfter(_ r1:Self, _ r2:Self) {return Element.nextAfter(self.c,self.p,r1.p,r2.p)} 114 | @inlinable public func copySign(_ r1:Self, _ r2:Self) {return Element.copySign(self.c,self.p,r1.p,r2.p)} 115 | @inlinable public func fdim(_ r1:Self, _ r2:Self) {return Element.fdim(self.c,self.p,r1.p,r2.p)} 116 | @inlinable public func fmax(_ r1:Self, _ r2:Self) {return Element.fmax(self.c,self.p,r1.p,r2.p)} 117 | @inlinable public func fmin(_ r1:Self, _ r2:Self) {return Element.fmin(self.c,self.p,r1.p,r2.p)} 118 | @inlinable public func maxMag(_ r1:Self, _ r2:Self) {return Element.maxMag(self.c,self.p,r1.p,r2.p)} 119 | @inlinable public func minMag(_ r1:Self, _ r2:Self) {return Element.minMag(self.c,self.p,r1.p,r2.p)} 120 | @inlinable public func nearbyInt(_ r:Self) {return Element.nearbyInt(self.c,self.p,r.p)} 121 | @inlinable public func rint(_ r:Self) {return Element.rint(self.c,self.p,r.p)} 122 | @inlinable public func round(_ r:Self) {return Element.round(self.c,self.p,r.p)} 123 | @inlinable public func trunc(_ r:Self) {return Element.trunc(self.c,self.p,r.p)} 124 | @inlinable public func expInt1(_ r:Self) {return Element.expInt1(self.c,self.p,r.p)} 125 | @inlinable public func packI(_ incra:Int, _ y:Self) {return Element.packI(self.c,self.p,incra,y.p)} 126 | @inlinable public func packV(_ ia:UnsafePointer, _ y:Self) {return Element.packV(self.c,self.p,ia,y.p)} 127 | @inlinable public func packM(_ ma:UnsafePointer, _ y:Self) {return Element.packM(self.c,self.p,ma,y.p)} 128 | @inlinable public func unpackI(_ y:Self, _ incry:Int) {return Element.unpackI(self.c,self.p,y.p,incry)} 129 | @inlinable public func unpackV(_ y:Self, _ iy:UnsafePointer) {return Element.unpackV(self.c,self.p,y.p,iy)} 130 | @inlinable public func unpackM(_ y:Self, _ my:UnsafePointer) {return Element.unpackM(self.c,self.p,y.p,my)} 131 | @inlinable public func copy(_ pDst:Self) {return Element.copy(self.p,pDst.p,self.c)} 132 | @inlinable public func move(_ pDst:Self) {return Element.move(self.p,pDst.p,self.c)} 133 | @inlinable public func set(_ val:Element, _ pDst:Self) {return Element.set(val,pDst.p,self.c)} 134 | @inlinable public func zero(_ pDst:Self) {return Element.zero(pDst.p,self.c)} 135 | @inlinable public func triangle(_ pDst:Self, _ magn:Element, _ rFreq:Element, _ asym:Element, _ pPhase:Self) {return Element.triangle(pDst.p,self.c,magn,rFreq,asym,pPhase.p)} 136 | @inlinable public func vectorJaehne(_ pDst:Self, _ magn:Element) {return Element.vectorJaehne(pDst.p,self.c,magn)} 137 | @inlinable public func vectorSlope(_ pDst:Self, _ offset:Element, _ slope:Element) {return Element.vectorSlope(pDst.p,self.c,offset,slope)} 138 | @inlinable public func addProduct(_ pSrc2:Self, _ pSrcDst:Self) {return Element.addProduct(self.p,pSrc2.p,pSrcDst.p,self.c)} 139 | @inlinable public func sumLn(_ pSum:Self) {return Element.sumLn(self.p,self.c,pSum.p)} 140 | @inlinable public func arctan(_ pDst:Self) {return Element.arctan(self.p,pDst.p,self.c)} 141 | @inlinable public func normalize(_ pDst:Self, _ vSub:Element, _ vDiv:Element) {return Element.normalize(self.p,pDst.p,self.c,vSub,vDiv)} 142 | @inlinable public func magnitude(_ pSrcRe:Self, _ pSrcIm:Self, _ pDst:Self) {return Element.magnitude(pSrcRe.p,pSrcIm.p,pDst.p,self.c)} 143 | @inlinable public func phase(_ pSrcRe:Self, _ pSrcIm:Self, _ pDst:Self) {return Element.phase(pSrcRe.p,pSrcIm.p,pDst.p,self.c)} 144 | @inlinable public func powerSpectr(_ pSrcRe:Self, _ pSrcIm:Self, _ pDst:Self) {return Element.powerSpectr(pSrcRe.p,pSrcIm.p,pDst.p,self.c)} 145 | @inlinable public func threshold_LT(_ pDst:Self, _ level:Element) {return Element.threshold_LT(self.p,pDst.p,self.c,level)} 146 | @inlinable public func threshold_GT(_ pDst:Self, _ level:Element) {return Element.threshold_GT(self.p,pDst.p,self.c,level)} 147 | @inlinable public func threshold_LTAbs(_ pDst:Self, _ level:Element) {return Element.threshold_LTAbs(self.p,pDst.p,self.c,level)} 148 | @inlinable public func threshold_GTAbs(_ pDst:Self, _ level:Element) {return Element.threshold_GTAbs(self.p,pDst.p,self.c,level)} 149 | @inlinable public func threshold_LTAbsVal(_ pDst:Self, _ level:Element, _ value:Element) {return Element.threshold_LTAbsVal(self.p,pDst.p,self.c,level,value)} 150 | @inlinable public func threshold_LTVal(_ pDst:Self, _ level:Element, _ value:Element) {return Element.threshold_LTVal(self.p,pDst.p,self.c,level,value)} 151 | @inlinable public func threshold_GTVal(_ pDst:Self, _ level:Element, _ value:Element) {return Element.threshold_GTVal(self.p,pDst.p,self.c,level,value)} 152 | @inlinable public func threshold_LTValGTVal(_ pDst:Self, _ levelLT:Element, _ valueLT:Element, _ levelGT:Element, _ valueGT:Element) {return Element.threshold_LTValGTVal(self.p,pDst.p,self.c,levelLT,valueLT,levelGT,valueGT)} 153 | @inlinable public func threshold_LTInv(_ pDst:Self, _ level:Element) {return Element.threshold_LTInv(self.p,pDst.p,self.c,level)} 154 | @inlinable public func cartToPolar(_ pSrcRe:Self, _ pSrcIm:Self, _ pDstMagn:Self, _ pDstPhase:Self) {return Element.cartToPolar(pSrcRe.p,pSrcIm.p,pDstMagn.p,pDstPhase.p,self.c)} 155 | @inlinable public func polarToCart(_ pSrcMagn:Self, _ pSrcPhase:Self, _ pDstRe:Self, _ pDstIm:Self) {return Element.polarToCart(pSrcMagn.p,pSrcPhase.p,pDstRe.p,pDstIm.p,self.c)} 156 | @inlinable public func flip(_ pDst:Self) {return Element.flip(self.p,pDst.p,self.c)} 157 | @inlinable public func winBartlett(_ pDst:Self) {return Element.winBartlett(self.p,pDst.p,self.c)} 158 | @inlinable public func winHann(_ pDst:Self) {return Element.winHann(self.p,pDst.p,self.c)} 159 | @inlinable public func winHamming(_ pDst:Self) {return Element.winHamming(self.p,pDst.p,self.c)} 160 | @inlinable public func winBlackman(_ pDst:Self, _ alpha:Element) {return Element.winBlackman(self.p,pDst.p,self.c,alpha)} 161 | @inlinable public func winBlackmanStd(_ pDst:Self) {return Element.winBlackmanStd(self.p,pDst.p,self.c)} 162 | @inlinable public func winBlackmanOpt(_ pDst:Self) {return Element.winBlackmanOpt(self.p,pDst.p,self.c)} 163 | @inlinable public func winKaiser(_ pDst:Self, _ alpha:Element) {return Element.winKaiser(self.p,pDst.p,self.c,alpha)} 164 | @inlinable public func min(_ pMin:Self) {return Element.min(self.p,self.c,pMin.p)} 165 | @inlinable public func max(_ pMax:Self) {return Element.max(self.p,self.c,pMax.p)} 166 | @inlinable public func minMax(_ pMin:Self, _ pMax:Self) {return Element.minMax(self.p,self.c,pMin.p,pMax.p)} 167 | @inlinable public func minAbs(_ pMinAbs:Self) {return Element.minAbs(self.p,self.c,pMinAbs.p)} 168 | @inlinable public func maxAbs(_ pMaxAbs:Self) {return Element.maxAbs(self.p,self.c,pMaxAbs.p)} 169 | @inlinable public func minIndx(_ pMin:Self, _ pIndx:UnsafeMutablePointer) {return Element.minIndx(self.p,self.c,pMin.p,pIndx)} 170 | @inlinable public func maxIndx(_ pMax:Self, _ pIndx:UnsafeMutablePointer) {return Element.maxIndx(self.p,self.c,pMax.p,pIndx)} 171 | @inlinable public func minMaxIndx(_ pMin:Self, _ pMinIndx:UnsafeMutablePointer, _ pMax:Self, _ pMaxIndx:UnsafeMutablePointer) {return Element.minMaxIndx(self.p,self.c,pMin.p,pMinIndx,pMax.p,pMaxIndx)} 172 | @inlinable public func mean(_ pMean:Self) {return Element.mean(self.p,self.c,pMean.p)} 173 | @inlinable public func stdDev(_ pStdDev:Self) {return Element.stdDev(self.p,self.c,pStdDev.p)} 174 | @inlinable public func meanStdDev(_ pMean:Self, _ pStdDev:Self) {return Element.meanStdDev(self.p,self.c,pMean.p,pStdDev.p)} 175 | @inlinable public func norm_Inf(_ pNorm:Self) {return Element.norm_Inf(self.p,self.c,pNorm.p)} 176 | @inlinable public func norm_L1(_ pNorm:Self) {return Element.norm_L1(self.p,self.c,pNorm.p)} 177 | @inlinable public func norm_L2(_ pNorm:Self) {return Element.norm_L2(self.p,self.c,pNorm.p)} 178 | @inlinable public func normDiff_Inf(_ pSrc2:Self, _ pNorm:Self) {return Element.normDiff_Inf(self.p,pSrc2.p,self.c,pNorm.p)} 179 | @inlinable public func normDiff_L1(_ pSrc2:Self, _ pNorm:Self) {return Element.normDiff_L1(self.p,pSrc2.p,self.c,pNorm.p)} 180 | @inlinable public func normDiff_L2(_ pSrc2:Self, _ pNorm:Self) {return Element.normDiff_L2(self.p,pSrc2.p,self.c,pNorm.p)} 181 | @inlinable public func dotProd(_ pSrc2:Self, _ pDp:Self) {return Element.dotProd(self.p,pSrc2.p,self.c,pDp.p)} 182 | @inlinable public func minEvery(_ pSrc2:Self, _ pDst:Self, _ len:UInt32) {return Element.minEvery(self.p,pSrc2.p,pDst.p,len)} 183 | @inlinable public func maxEvery(_ pSrc2:Self, _ pDst:Self, _ len:UInt32) {return Element.maxEvery(self.p,pSrc2.p,pDst.p,len)} 184 | @inlinable public func maxOrder(_ pOrder:UnsafeMutablePointer) {return Element.maxOrder(self.p,self.c,pOrder)} 185 | @inlinable public func sampleUp(_ srcLen:Int, _ pDst:Self, _ pDstLen:UnsafeMutablePointer, _ factor:Int, _ pPhase:UnsafeMutablePointer) {return Element.sampleUp(self.p,srcLen,pDst.p,pDstLen,factor,pPhase)} 186 | @inlinable public func sampleDown(_ srcLen:Int, _ pDst:Self, _ pDstLen:UnsafeMutablePointer, _ factor:Int, _ pPhase:UnsafeMutablePointer) {return Element.sampleDown(self.p,srcLen,pDst.p,pDstLen,factor,pPhase)} 187 | @inlinable public func filterMedian(_ pDst:Self, _ maskSize:Int, _ pDlySrc:Self, _ pDlyDst:Self, _ pBuffer:UnsafeMutablePointer) {return Element.filterMedian(self.p,pDst.p,self.c,maskSize,pDlySrc.p,pDlyDst.p,pBuffer)} 188 | @inlinable public func rngCauchy(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element)->Int32 {return Element.rngCauchy(method,stream,self.c,r.p,a,b)} 189 | @inlinable public func rngUniform(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element)->Int32 {return Element.rngUniform(method,stream,self.c,r.p,a,b)} 190 | @inlinable public func rngGaussian(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element)->Int32 {return Element.rngGaussian(method,stream,self.c,r.p,a,b)} 191 | @inlinable public func rngGaussianMV(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ dimen:Int, _ mstorage:Int32, _ t:Self)->Int32 {return Element.rngGaussianMV(method,stream,self.c,r.p,dimen,mstorage,self.p,t.p)} 192 | @inlinable public func rngExponential(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element)->Int32 {return Element.rngExponential(method,stream,self.c,r.p,a,b)} 193 | @inlinable public func rngLaplace(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element)->Int32 {return Element.rngLaplace(method,stream,self.c,r.p,a,b)} 194 | @inlinable public func rngWeibull(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element, _ c:Element)->Int32 {return Element.rngWeibull(method,stream,self.c,r.p,a,b,c)} 195 | @inlinable public func rngRayleigh(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element)->Int32 {return Element.rngRayleigh(method,stream,self.c,r.p,a,b)} 196 | @inlinable public func rngLognormal(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element, _ c:Element, _ d:Element)->Int32 {return Element.rngLognormal(method,stream,self.c,r.p,a,b,c,d)} 197 | @inlinable public func rngGumbel(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element)->Int32 {return Element.rngGumbel(method,stream,self.c,r.p,a,b)} 198 | @inlinable public func rngGamma(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element, _ c:Element)->Int32 {return Element.rngGamma(method,stream,self.c,r.p,a,b,c)} 199 | @inlinable public func rngBeta(_ method:Int32, _ stream:VSLStreamStatePtr, _ r:Self, _ a:Element, _ b:Element, _ c:Element, _ d:Element)->Int32 {return Element.rngBeta(method,stream,self.c,r.p,a,b,c,d)} 200 | 201 | @inlinable public func asum()->Element { return asum(1) } 202 | @inlinable public func nrm2()->Element { return nrm2(1) } 203 | @inlinable public func dot(_ b:Self)->Element { return dot(1, b, 1) } 204 | @inlinable public func set(_ b: Element) { set(b,self) } 205 | @inlinable public func zero() { zero(self) } 206 | @inlinable public func move(_ b:Self, _ n:Int) { Element.move(p, b.p, n) } 207 | @inlinable public func move(_ b:Self, _ n:Int, fromIdx:Int, toIdx:Int) { Element.move(p+fromIdx, b.p+toIdx, n) } 208 | 209 | @inlinable public func ln_() { ln(self) } 210 | @inlinable public func ln() -> Self { return new_call(ln) } 211 | @inlinable public func abs_() { abs(self) } 212 | @inlinable public func abs() -> Self { return new_call(abs) } 213 | @inlinable public func inv_() { inv(self) } 214 | @inlinable public func inv() -> Self { return new_call(inv) } 215 | @inlinable public func sqr_() { sqr(self) } 216 | @inlinable public func sqr() -> Self { return new_call(sqr) } 217 | @inlinable public func exp_() { exp(self) } 218 | @inlinable public func exp() -> Self { return new_call(exp) } 219 | @inlinable public func cos_() { cos(self) } 220 | @inlinable public func cos() -> Self { return new_call(cos) } 221 | @inlinable public func sin_() { sin(self) } 222 | @inlinable public func sin() -> Self { return new_call(sin) } 223 | @inlinable public func tan_() { tan(self) } 224 | @inlinable public func tan() -> Self { return new_call(tan) } 225 | @inlinable public func erf_() { erf(self) } 226 | @inlinable public func erf() -> Self { return new_call(erf) } 227 | @inlinable public func sqrt_() { sqrt(self) } 228 | @inlinable public func sqrt() -> Self { return new_call(sqrt) } 229 | @inlinable public func cbrt_() { cbrt(self) } 230 | @inlinable public func cbrt() -> Self { return new_call(cbrt) } 231 | @inlinable public func cosh_() { cosh(self) } 232 | @inlinable public func cosh() -> Self { return new_call(cosh) } 233 | @inlinable public func sinh_() { sinh(self) } 234 | @inlinable public func sinh() -> Self { return new_call(sinh) } 235 | @inlinable public func tanh_() { tanh(self) } 236 | @inlinable public func tanh() -> Self { return new_call(tanh) } 237 | @inlinable public func acos_() { acos(self) } 238 | @inlinable public func acos() -> Self { return new_call(acos) } 239 | @inlinable public func asin_() { asin(self) } 240 | @inlinable public func asin() -> Self { return new_call(asin) } 241 | @inlinable public func atan_() { atan(self) } 242 | @inlinable public func atan() -> Self { return new_call(atan) } 243 | @inlinable public func erfc_() { erfc(self) } 244 | @inlinable public func erfc() -> Self { return new_call(erfc) } 245 | @inlinable public func ceil_() { ceil(self) } 246 | @inlinable public func ceil() -> Self { return new_call(ceil) } 247 | @inlinable public func rint_() { rint(self) } 248 | @inlinable public func rint() -> Self { return new_call(rint) } 249 | @inlinable public func expm1_() { expm1(self) } 250 | @inlinable public func expm1() -> Self { return new_call(expm1) } 251 | @inlinable public func log10_() { log10(self) } 252 | @inlinable public func log10() -> Self { return new_call(log10) } 253 | @inlinable public func log1p_() { log1p(self) } 254 | @inlinable public func log1p() -> Self { return new_call(log1p) } 255 | @inlinable public func acosh_() { acosh(self) } 256 | @inlinable public func acosh() -> Self { return new_call(acosh) } 257 | @inlinable public func asinh_() { asinh(self) } 258 | @inlinable public func asinh() -> Self { return new_call(asinh) } 259 | @inlinable public func atanh_() { atanh(self) } 260 | @inlinable public func atanh() -> Self { return new_call(atanh) } 261 | @inlinable public func floor_() { floor(self) } 262 | @inlinable public func floor() -> Self { return new_call(floor) } 263 | @inlinable public func round_() { round(self) } 264 | @inlinable public func round() -> Self { return new_call(round) } 265 | @inlinable public func trunc_() { trunc(self) } 266 | @inlinable public func trunc() -> Self { return new_call(trunc) } 267 | @inlinable public func erfInv_() { erfInv(self) } 268 | @inlinable public func erfInv() -> Self { return new_call(erfInv) } 269 | @inlinable public func pow3o2_() { pow3o2(self) } 270 | @inlinable public func pow3o2() -> Self { return new_call(pow3o2) } 271 | @inlinable public func pow2o3_() { pow2o3(self) } 272 | @inlinable public func pow2o3() -> Self { return new_call(pow2o3) } 273 | @inlinable public func invSqrt_() { invSqrt(self) } 274 | @inlinable public func invSqrt() -> Self { return new_call(invSqrt) } 275 | @inlinable public func invCbrt_() { invCbrt(self) } 276 | @inlinable public func invCbrt() -> Self { return new_call(invCbrt) } 277 | @inlinable public func nearbyInt_() { nearbyInt(self) } 278 | @inlinable public func nearbyInt() -> Self { return new_call(nearbyInt) } 279 | 280 | @inlinable public func pow_(_ b:Self) { pow(b, self) } 281 | @inlinable public func pow(_ b:Self)->Self { return new_call(pow, b) } 282 | @inlinable public func hypot_(_ b:Self) { hypot(b, self) } 283 | @inlinable public func hypot(_ b:Self)->Self { return new_call(hypot, b) } 284 | @inlinable public func atan2_(_ b:Self) { atan2(b, self) } 285 | @inlinable public func atan2(_ b:Self)->Self { return new_call(atan2, b) } 286 | 287 | @inlinable func ipp_reduce(_ f:(Self)->())->Element { let res = Self.init(1); f(res); return res[0] } 288 | 289 | @inlinable public func mean()->Element { return ipp_reduce(mean) } 290 | @inlinable public func stdDev()->Element { return ipp_reduce(stdDev) } 291 | @inlinable public func max()->Element { return ipp_reduce(max) } 292 | @inlinable public func min()->Element { return ipp_reduce(min) } 293 | 294 | @inlinable public func normDiff_Inf(_ b:Self)->Element {return ipp_reduce({normDiff_Inf(b, $0)})} 295 | @inlinable public func normDiff_L1(_ b:Self)->Element {return ipp_reduce({normDiff_L1(b, $0)})} 296 | @inlinable public func normDiff_L2(_ b:Self)->Element {return ipp_reduce({normDiff_L2(b, $0)})} 297 | 298 | @inlinable public func powx_(_ b:Element) { powx(b, self) } 299 | @inlinable public func powx(_ b:Element)->Self { return new_call(powx, b) } 300 | 301 | @inlinable public func packIncrement(_ incr:Int, _ from:Int, _ n:Int, _ dest:Self) { Element.packI(n, p+from, incr, dest.p) } 302 | @inlinable public func packIncrement(_ incr:Int, _ from:Int, _ n:Int)->Self { 303 | let res = new(n); packIncrement(incr, from, n, res); return res 304 | } 305 | @inlinable public func packIndices(_ idxs:[Int32], _ dest:Self) { Element.packV(idxs.count, p, idxs, dest.p) } 306 | @inlinable public func packMasked( _ mask:[Int32], _ dest:Self) { Element.packM(mask.count, p, mask, dest.p) } 307 | @inlinable public func packIndices(_ idxs:[Int32])->Self { return new_call(packIndices, idxs, n:idxs.count) } 308 | @inlinable public func packMasked( _ mask:[Int32])->Self { return new_call(packMasked, mask, n:Int(mask.reduce(0,+))) } 309 | } 310 | 311 | --------------------------------------------------------------------------------