This function mimics the 'base' function sort to operate on gpu.matrix-class objects.
This function sort the input matrix into ascending or descending order.
Usage
# S4 method for gpu.matrix.tensorflow,logical
sort(x,decreasing)
# S4 method for gpu.matrix.torch,logical
sort(x,decreasing)
Value
Returns a gpu.matrix-class object that is a vector (or a matrix with one column) with the values sorted.
Arguments
x
a gpu.matrix.
decreasing
Logical. Should the sort be increasing or decreasing?
Details
The function internally calls the corresponding function of the library torch or tensorflow (depending on the type of input gpu.matrix-class).
If the input gpu.matrix-class object(s) are stored on the GPU, then the operations will be performed on the GPU. See gpu.matrix.