Closed tclements closed 3 years ago
Testing the fix now. I'm adding automated tests for all processing operations on NodalData (except ungap and merge, which are currently inapplicable). Since the structure has significant differences from SeisData and EventTraceData, I want to be sure that you don't run into problems further down the line.
Incidentally, how do views of an Array{Float32, 2} (equivalently, Matrix{Float32}) behave on GPU with your package?
Views work just the same as normal arrays but I believe they have to be contiguous. Views do not interact well with transposes or reshapes at the moment - https://github.com/JuliaGPU/Adapt.jl/issues/21 but apparently a fix could be on the way at some point https://github.com/JuliaLang/julia/pull/31563
Perfect. I'm pretty sure I have no transpose or reshape calls in SeisIO processing functions at the moment. Eventually, as your group gets further into nodal arrays, you'll be able to write NodalData processing methods into the submodule for two-dimensional FFTs on the underlying :data
field. So, I think this will need only a minor tweak to allowed data types to be fully GPU compatible.
Fixed on dev
Fixed on master and in the new release. Will close this issue as soon as Julia Registrator merges my PR(s).
On the dev branch
with the test TDMS data
detrend!
failsI believe this is an issue with the definition of
dtr!
Using the
NodalData.x[i]
syntax returns aSubArray
type:but
dtr!
only acceptsArray
s. Changingdtr!
to acceptAbstractArray
asfunction dtr!(x::AbstractArray{T,1}, ti::Array{Int64,2}, fs::Float64, n::Int64) where T <: AbstractFloat
should fix this:works! Should be an easy change.