This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SVJ | |
#= | |
Wrapper for Jacobi SVD subroutines from LAPACK | |
*WARNING* This is a draft. Only `joba = 'G'` has been tested. | |
Boilerplate copied from Julia LinearAlgebra standard library | |
copyright (c) 2009-2019: the Julia developers https://julialang.org | |
License: MIT Expat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CuArrays | |
const ArrayType = CuArray | |
const TY = Float32 | |
const half = convert(TY,0.5) | |
function ksintegrateInplaceGPU(u_in, Lx_in, dt_in, Nt) | |
dt = convert(TY,dt_in) | |
Lx = convert(TY,Lx_in) | |
u = ArrayType((1+0im)*convert.(TY,u_in)) # force u to be complex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__precompile__() | |
module RData | |
using DataFrames, CategoricalArrays, Missings, CodecZlib, FileIO, TimeZones | |
import DataFrames: identifier | |
import FileIO | |
export | |
sexp2julia, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= | |
Vector Chebyshev transforms | |
Like the 1-D versions from ApproxFun, but many at once. | |
Should also work with Complex eltypes! | |
# WARNING: in-place versions not yet checked. | |
# WARNING: A_mul_B!(y,plan,x) typically mutates x AND y | |
extensions | |
Copyright (c) 2017: Ralph Smith |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Julia doesn't have cross-process semaphores/mutexes. | |
# Here is a work-around using Tasks and Channels. | |
# The example controls access to a file written by workers. | |
# | |
# Design: | |
# each worker shares Req and Reply channels w/ master | |
# worker puts a token in Req channel when wanting access, waits on Reply channel | |
# when woken, writes to file, then posts Req and goes back to work. | |
# task on master (one per worker) waits on Req channel |