CLEAR

From Jacket Wiki

Jump to: navigation, search
Back to Function List

Remove items from workspace, freeing up system memory

Usage

Jacket for M Language
    Supported Syntax
    
clear
clear name
clear name1 name2 name3 ...
clear global name
clear -regexp expr1 expr2 ...
clear global -regexp expr1 expr2 ...
clear keyword
clear('name1','name2','name3',...)
    

GFOR Supported

Yes

GCOMPILE Supported

Yes

Types Supported

-  GDOUBLE   GSINGLE   GLOGICAL   GINT32   GINT8   GUINT32   GUINT8   COMPLEX 

Types Not Supported

-

CPU usageJacket only contains GPU computing functions. To run functions on the CPU, try one of the MathWorks products:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/clear.html
More Details

CLEAR, executed at any time while running Jacket code, will clear all variables from the workspace, but not from memory. For example, in the following case, GINFO will still report a non-zero figure for GPU memory used:

A = grand(300);
clear
ginfo

CLEAR ALL clears all GPU memory in use. After running this, GINFO will report 0 MB used.


See Also

CLC, CLEARVARS, CLOSE, DELETE, IMPORT, INMEM, LOAD, MEMORY, MLOCK, MUNLOCK, PACK, PERSISTENT, SAVE, WHO, WHOS, WORKSPACE

Views
Personal tools