parameters: (filename, clean_lines, linenum, error)
docstring: Checks for calls to C random functions (rand, rand_r, random, ...).
  
    Caffe code should (almost) always use the caffe_rng_* functions rather
    than these, as the internal state of these C functions is independent of the
    native Caffe RNG system which should produce deterministic results for a
    fixed Caffe seed set using Caffe::set_random_seed(...).
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
docstring_summary: Checks for calls to C random functions (rand, rand_r, random, ...).
docstring_tokens: Checks for calls to C random functions ( rand rand_r random ... ) .
function: def CheckCaffeRandom(filename, clean_lines, linenum, error):
    """Checks for calls to C random functions (rand, rand_r, random, ...).
  
    Caffe code should (almost) always use the caffe_rng_* functions rather
    than these, as the internal state of these C functions is independent of the
    native Caffe RNG system which should produce deterministic results for a
    fixed Caffe seed set using Caffe::set_random_seed(...).
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
    """
    line = clean_lines.elided[linenum]
    for function in c_random_function_list:
      ix = line.find(function)
      # Comparisons made explicit for clarity -- pylint: disable=g-explicit-bool-comparison
      if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and
                                  line[ix - 1] not in ('_', '.', '>'))):
        error(filename, linenum, 'caffe/random_fn', 2,
              'Use caffe_rng_rand() (or other caffe_rng_* function) instead of '
              + function +
              ') to ensure results are deterministic for a fixed Caffe seed.')
function_tokens: def CheckCaffeRandom ( filename , clean_lines , linenum , error ) : line = clean_lines . elided [ linenum ] for function in c_random_function_list : ix = line . find ( function ) # Comparisons made explicit for clarity -- pylint: disable=g-explicit-bool-comparison if ix >= 0 and ( ix == 0 or ( not line [ ix - 1 ] . isalnum ( ) and line [ ix - 1 ] not in ( '_' , '.' , '>' ) ) ) : error ( filename , linenum , 'caffe/random_fn' , 2 , 'Use caffe_rng_rand() (or other caffe_rng_* function) instead of ' + function + ') to ensure results are deterministic for a fixed Caffe seed.' )