Matrix | R Documentation |
The function create a matrix, it is only useful in the openCL functions. it can also be called in R, but its argument may or may not take any effect.
Matrix(nrow = 1, ncol = 1, precision = GPUVar$default_float, constDef = FALSE, shared = FALSE, location = "global")
nrow, ncol |
The matrix dimension. |
precision |
The variable type, please refer to |
constDef |
Specify if the variable can be redefined. The package will automatically update the variable definition when it is needed, if you do not need this feature, you can manually turn the feature off. It is useful in some special cases such as turning off the auto update to do the integer division (By default, the package will convert the variable to the default float type before doing the division). |
shared |
If the matrix is shared by all the workers in a work group. Do not use it if you don't know its meaning. |
location |
The physical memory location of the matrix, it can be either 'global' or 'local'. Do not use it if you don't know its meaning. |
a matrix initialize with 0.
#Create a 10-by-10 matrix A=Matrix(10,10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.