MilesCranmer commited on
Commit
cf89640
1 Parent(s): dc01abd

Idea for getting algorithm on GPU

Browse files
Files changed (1) hide show
  1. README.md +11 -0
README.md CHANGED
@@ -341,6 +341,17 @@ pd.DataFrame, Results dataframe, giving complexity, MSE, and equations
341
  - [ ] Try @spawn over each sub-population. Do random sort, compute mutation for each, then replace 10% oldest.
342
  - [ ] Performance: try inling things?
343
  - [ ] Try defining a binary tree as an array, rather than a linked list. See https://stackoverflow.com/a/6384714/2689923
 
 
 
 
 
 
 
 
 
 
 
344
 
345
  - [ ] Can we cache calculations, or does the compiler do that? E.g., I should only have to run exp(x0) once; after that it should be read from memory.
346
  - Done on caching branch. Currently am finding that this is quiet slow (presumably because memory allocation is the main issue).
 
341
  - [ ] Try @spawn over each sub-population. Do random sort, compute mutation for each, then replace 10% oldest.
342
  - [ ] Performance: try inling things?
343
  - [ ] Try defining a binary tree as an array, rather than a linked list. See https://stackoverflow.com/a/6384714/2689923
344
+ ```julia
345
+ mutable struct Tree
346
+ degree::Array{Integer, 1}
347
+ val::Array{Float32, 1}
348
+ constant::Array{Bool, 1}
349
+ op::Array{Integer, 1}
350
+ Tree(s::Integer) = new(zeros(Integer, s), zeros(Float32, s), zeros(Bool, s), zeros(Integer, s))
351
+ end
352
+ ```
353
+ - Then, we could even work with trees on the GPU, since they are all pre-allocated arrays.
354
+ - A population could be a Tree, but with degree 2 on all the degrees. So a slice of population arrays forms a tree.
355
 
356
  - [ ] Can we cache calculations, or does the compiler do that? E.g., I should only have to run exp(x0) once; after that it should be read from memory.
357
  - Done on caching branch. Currently am finding that this is quiet slow (presumably because memory allocation is the main issue).