You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: vl_simplenn_start_parserv.m
    path of file: ./repos/Image-Text-Embedding/matlab/simplenn
    
    the code of the file until where you have to start completion: function vl_simplenn_start_parserv(net, ps)
%VL_SIMPLENN_START_PARSERV   Setup a parameter server for this network
%    VL_SIMPLENN_START_PARSERV(NET, PS) registers the network
%    parameter derivatives with the specified ParameterServer instance

    
function vl_simplenn_start_parserv(net, ps)
%VL_SIMPLENN_START_PARSERV   Setup a parameter server for this network
%    VL_SIMPLENN_START_PARSERV(NET, PS) registers the network
%    parameter derivatives with the specified ParameterServer instance
%    PS and then starts the server.

for i = 1:numel(net.layers)
  for j = 1:numel(net.layers{i}.weights)
    value = net.layers{i}.weights{j} ;
    name = sprintf('l%d_%d',i,j) ;
    if strcmp(class(value),'gpuArray')
      deviceType = 'gpu' ;
      dataType = classUnderlying(value) ;
    else
      deviceType = 'cpu' ;
      dataType = class(value) ;
    end