neurotools.obsolete.gpu.cu.matrix module

neurotools.obsolete.gpu.cu.matrix.gputranspose(rows, cols)

Prepares a map kernel that transposed a row-major packed float matrix Eg: gputranspose(rows,cols)(data) will transpose data. Creates a new, memoized, kernel for each array dimension

neurotools.obsolete.gpu.cu.matrix.transpose(m)

This is a list datatype wrapper to gputranspose. It accepts a matrix as a list of lists, and returns the same form

class neurotools.obsolete.gpu.cu.matrix.GPUMatrix(data, rows, cols)[source]

Bases: object

This is a shallow wrapper of GPUArray. A GPUMatrix is simply a GPUArray containing the matrix in row major order, as well as the dimensions of the matrix. GPUArray might even already have this functionality

neurotools.obsolete.gpu.cu.matrix.matkern(source)[source]

This is a higher order function to simplify row-parallelized matrix kernel creation. We assume that we have a kernel that accepts data, cols. We create a function that accepts data,cols, as either two arguments or a single tuple. We execute the kernel, assuming that the return data is placed in the argument array. We return a tuple of the now modified data and the row length

neurotools.obsolete.gpu.cu.matrix.matscalar(source)[source]

For creation of matrix kernels that compute scalar results. Accepts source. Returns a function from (data,cols)->(scalars).

neurotools.obsolete.gpu.cu.matrix.matouter(source)[source]
neurotools.obsolete.gpu.cu.matrix.convertToZScores(data, cols=None)

Equivalent to mean centering then normalization. This function does not return a value, but replaces the contents of the given data.

neurotools.obsolete.gpu.cu.matrix.meanCenter(data, cols=None)

This will subtract the mean from each row. This function modifies its arguments, replacing them with return values

neurotools.obsolete.gpu.cu.matrix.normalize(data, cols=None)

This will normalize each row of a matrix on parallel on the GPU

neurotools.obsolete.gpu.cu.matrix.magnitudes(data, cols=None)

This will return the magnitude of each row

neurotools.obsolete.gpu.cu.matrix.sums(data, cols=None)

This will return the sum of each row

neurotools.obsolete.gpu.cu.matrix.means(data, cols=None)

This will return the population mean for each row

neurotools.obsolete.gpu.cu.matrix.variances(data, cols=None)

This will return the population variance for each row

neurotools.obsolete.gpu.cu.matrix.samplevariances(data, cols=None)

This will return the sample variance for each row

neurotools.obsolete.gpu.cu.matrix.stds(x)

This will return the sample standard deviation for each row

neurotools.obsolete.gpu.cu.matrix.dotproducts(data, cols=None)

Also known as : a matrix times its transpose. Input data is not altered

neurotools.obsolete.gpu.cu.matrix.correlation(x)

Computes mean centered correlation matrix from a list of vectors

neurotools.obsolete.gpu.cu.matrix.correlation2(x)

Computes the uncentered correlation matrix from a list of vectors