refactored nn.cu to use all available gpus, removed sqrt