Closed cortner closed 1 year ago
not sure what else to call this. Maybe a bug in ObjectPools? Maybe in StrideArrays? Maybe in P4ML? For now I'm filing it here. It is VERY disconcerting ...
using Polynomials4ML cheb = chebyshev_basis(11) X = 2 * rand(7) .- 1 dP = Polynomials4ML.evaluate_d(cheb, X) u = randn(11) dP[1, :] == (@view dP[1,:]) # true dot(dP[1, :], u) == dot((@view dP[1,:]), u) # false dp1 = collect((@view dP[1,:])) dot((@view dP[1,:]), u) == dot(dp1, u) # true dot((@view dP[1,:]), u) == dot([dP[1,j] for j = 1:11], u) # true
The @view version gives the correct result. REALLY?!?!?!?
@view
moving this to ObjectPools
not sure what else to call this. Maybe a bug in ObjectPools? Maybe in StrideArrays? Maybe in P4ML? For now I'm filing it here. It is VERY disconcerting ...
The
@view
version gives the correct result. REALLY?!?!?!?