<commit_before>#include "PresetFrameIO.hpp"
#include "wipemalloc.h"
#include <math.h>
#include <cassert>
#include <iostream>
PresetInputs::PresetInputs()
{
}

void PresetInputs::Initialize(int gx, int gy)
{
  int x, y;

  this->gx =gx; 
  this->gy=gy;
  std::cerr << "Allocating x_mesh, gx,gy is " << gx << "," << gy << std::endl;
  this->x_mesh=(float **)wipemalloc(gx * sizeof(float *));
  assert(x_mesh);
  for(x = 0; x < gx; x++)
    {
      this->x_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->y_mesh=(float **)wipemalloc(gx * sizeof(float *));
  for(x = 0; x < gx; x++)
    {
      this->y_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
      
    }
  this->rad_mesh=(float **)wipemalloc(gx * sizeof(float *));
  for(x = 0; x < gx; x++)
    {
      this->rad_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->theta_mesh=(float **)wipemalloc(gx * sizeof(float *));
  for(x = 0; x <gx; x++)
    {
      this->theta_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }

 this->origtheta=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->origtheta[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->origrad=(float **)wipemalloc(gx * sizeof(float *));
     for(x = 0; x < gx; x++)
    {
      this->origrad[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->origx=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->origx[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->origy=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->origy[x] = (float *)wipemalloc(gy * sizeof(float));
    }

for (x=0;x<gx;x++)
    {
      for(y=0;y<gy;y++)
	{
	   this->origx[x][y]=x/(float)(gx-1);
	   this->origy[x][y]=-((y/(float)(gy-1))-1);
	   this->origrad[x][y]=hypot((this->origx[x][y]-.5)*2,(this->origy[x][y]-.5)*2) * .7071067;
  	   this->origtheta[x][y]=atan2(((this->origy[x][y]-.5)*2),((this->origx[x][y]-.5)*2));
        }
    }

   
  
}

PresetOutputs::PresetOutputs()
{
}

void PresetOutputs::Initialize(int gx, int gy)
{
  int x;
  this->sx_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->sx_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->sy_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->sy_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->dx_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->dx_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->dy_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->dy_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->cx_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->cx_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->cy_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->cy_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->zoom_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->zoom_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->zoomexp_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->zoomexp_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->rot_mesh=(float **)wipemalloc(gy * sizeof(float *));
 for(x = 0; x < gx; x++)
    { 
      this->rot_mesh[x] = (float *)wipemalloc(gy * sizeof(float));<commit_msg>PJS: oops gy not gx<commit_after>#include "PresetFrameIO.hpp"
#include "wipemalloc.h"
#include <math.h>
#include <cassert>
#include <iostream>
PresetInputs::PresetInputs()
{
}

void PresetInputs::Initialize(int gx, int gy)
{
  int x, y;

  this->gx =gx; 
  this->gy=gy;
  std::cerr << "Allocating x_mesh, gx,gy is " << gx << "," << gy << std::endl;
  this->x_mesh=(float **)wipemalloc(gx * sizeof(float *));
  assert(x_mesh);
  for(x = 0; x < gx; x++)
    {
      this->x_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->y_mesh=(float **)wipemalloc(gx * sizeof(float *));
  for(x = 0; x < gx; x++)
    {
      this->y_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
      
    }
  this->rad_mesh=(float **)wipemalloc(gx * sizeof(float *));
  for(x = 0; x < gx; x++)
    {
      this->rad_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->theta_mesh=(float **)wipemalloc(gx * sizeof(float *));
  for(x = 0; x <gx; x++)
    {
      this->theta_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }

 this->origtheta=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->origtheta[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->origrad=(float **)wipemalloc(gx * sizeof(float *));
     for(x = 0; x < gx; x++)
    {
      this->origrad[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->origx=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->origx[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->origy=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->origy[x] = (float *)wipemalloc(gy * sizeof(float));
    }

for (x=0;x<gx;x++)
    {
      for(y=0;y<gy;y++)
	{
	   this->origx[x][y]=x/(float)(gx-1);
	   this->origy[x][y]=-((y/(float)(gy-1))-1);
	   this->origrad[x][y]=hypot((this->origx[x][y]-.5)*2,(this->origy[x][y]-.5)*2) * .7071067;
  	   this->origtheta[x][y]=atan2(((this->origy[x][y]-.5)*2),((this->origx[x][y]-.5)*2));
        }
    }

   
  
}

PresetOutputs::PresetOutputs()
{
}

void PresetOutputs::Initialize(int gx, int gy)
{
  int x;
  this->sx_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->sx_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->sy_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->sy_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->dx_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->dx_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->dy_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->dy_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->cx_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->cx_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->cy_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->cy_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->zoom_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->zoom_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->zoomexp_mesh=(float **)wipemalloc(gx * sizeof(float *));
 for(x = 0; x < gx; x++)
    {
      this->zoomexp_mesh[x] = (float *)wipemalloc(gy * sizeof(float));
    }
  this->rot_mesh=(float **)wipemalloc(gy * sizeof(float *));
 for(x = 0; x < gx; x++)
    { 
      this->rot_mesh[x] = (float *)wipemalloc(gx * sizeof(float));
{'fraction_non_alphanumeric': 0.23701749514023882, 'fraction_numerical': 0.010552624271035824, 'mean_word_length': 3.310592459605027, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4807854', 'n_tokens_mistral': 3164, 'n_tokens_neox': 3103, 'n_words': 505}