Skip to content

Instantly share code, notes, and snippets.

@ztellman
Created September 1, 2009 02:38
Show Gist options
  • Save ztellman/178856 to your computer and use it in GitHub Desktop.
Save ztellman/178856 to your computer and use it in GitHub Desktop.
(use 'penumbra.compute 'penumbra.app)
(with-gl
(defmap generate
(let [s (sin :index)]
(normalize
(float3 s (* 3.0 (cos :index)) (/ (* s s) 2.0)))))
(defreduce find-max
(max %1 %2))
(dotimes [_ 100]
(time (println (find-max (generate 5e6))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment