 __global__ void k_sigmoidGradient_f( floatType_t  *array,
                                      int    const size )
 {
+
+/* setup global threadID in X direction */
+
   int tid = blockDim.x * blockIdx.x + threadIdx.x;
+
   if( tid < size )
+  {
+
+/* use the sigmoidGradient_f function to complete this loop */
+
     array[tid] = sigmoidGradient_f( array[tid] );
+
+  } /* end if */
 } /* end sigmoidGradient */
 
 /* kernel to set the delta3 vector from Y properly 

__global__ void k_sigmoid_f( floatType_t  *array,
                                     int    const size )
{
  int tid = blockDim.x * blockIdx.x + threadIdx.x;
  if( tid < size )
    array[tid] = sigmoid_f( array[tid] );
} /* end sigmoidGradient */

/* kernel for calculating the gradient of the sigmoid function */


__global__ void initOne( int size, floatType_t *array )
{

/* setup global threadID in X direction */

  int tid = blockDim.x * blockIdx.x + threadIdx.x;

  if( tid < size )
    array[tid] = (floatType_t) 1.0;
  return;
