Skip to content

Instantly share code, notes, and snippets.

@denizyuret
Created December 2, 2017 13:07
Show Gist options
  • Save denizyuret/0100c8383df9cf4cd0106f54599603c5 to your computer and use it in GitHub Desktop.
Save denizyuret/0100c8383df9cf4cd0106f54599603c5 to your computer and use it in GitHub Desktop.
using CuArrays
a = rand(4,4,4)
@show summary(a)
@show summary(a[:,2,2])
@show summary(a[:,[2,4],2])
@show summary(a[:,[2,4],[1,3]])
@show summary(a[:,[2,4],:])
@show summary(a[:,2:4,:])
@show summary(a[:,1:2:4,:])
a = cu(a)
@show summary(a)
@show summary(a[:,2,2])
@show summary(a[:,[2,4],2])
@show summary(a[:,[2,4],[1,3]])
@show summary(a[:,[2,4],:])
@show summary(a[:,2:4,:])
@show summary(a[:,1:2:4,:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment