function id = eml_rand_str2id(str)
%MATLAB Code Generation Private Function

%   Copyright 2011 The MathWorks, Inc.
%#codegen

eml_prefer_const(str);
switch str
    case 'default'
        id = uint32(0);
    case 'mcg16807' % v4
        id = uint32(4);
    case 'shr3cong' % v5normal
        id = uint32(5);
    case 'mt19937ar' % twister
        id = uint32(7);
    otherwise
        eml_assert(false,'Input must be ''default'', ''mcg16807'', ''shr3cong'', or ''mt19937ar''.');
end
