Skip to content
Snippets Groups Projects
Select Git revision
  • 6711d4730bf6a476f1cd3439cdeadd9ad4f7c19d
  • main default protected
  • oleg-alexandrov-patch-1
  • radtan
  • 2.0
  • Kelvinrr-patch-1
  • acpaquette-patch-1
  • gxp_testing
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.7.0
  • 1.6.0
  • 1.5.2
  • 1.5.1
  • 1.5.0
  • 1.4.1
  • 1.4.0
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1.1
  • 1.1.0
  • 1.0.0
24 results

UsgsAstroFrameSensorModel.cpp

Blame
  • init.c 12.74 KiB
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include "allvars.h"
    #include "proto.h"
    
    void init(int index)
    {
    
      TAKE_TIME_START(total);
    
       // DAV: the corresponding KernelLen is calculated within the wstack function. It can be anyway hardcoded for optimization
       dx = 1.0/(double)param.grid_size_x;
       dw = 1.0/(double)param.num_w_planes;
       w_supporth = (double)((param.w_support-1)/2)*dx;
                                
       // MESH SIZE
       int local_grid_size_x;// = 8;
       int local_grid_size_y;// = 8;
       
       // set the local size of the image
       local_grid_size_x = param.grid_size_x;
       nsectors = NUM_OF_SECTORS;
       if (nsectors < 0) nsectors = size;
       local_grid_size_y = param.grid_size_y/nsectors;
       //nsectors = size;
    
       // LOCAL grid size
       xaxis = local_grid_size_x;
       yaxis = local_grid_size_y;
    
       #ifdef USE_MPI
       numa_init( global_rank, size, &MYMPI_COMM_WORLD, &Me );
       
       if(global_rank == 0)
         printf("\nTask %d sees %d topology levels\n", global_rank, Me.MAXl);
       #endif
    
       TAKE_TIME_START(setup);
    
       // INPUT FILES (only the first ndatasets entries are used)
       strcpy(datapath,param.datapath_multi[index]);
       sprintf(num_buf, "%d", index);
       
       //Changing the output file names
       op_filename();
       
       // Read metadata
       fileName(datapath, in.metafile);
       readMetaData(filename);
       
       // Local Calculation
       metaData_calculation();
       
       // Allocate Data Buffer
       allocate_memory();
       
       // Reading Data
       readData();
       
      #ifdef USE_MPI
       MPI_Barrier(MPI_COMM_WORLD);
      #endif
       
       TAKE_TIME_STOP(setup);
    }
    
    void op_filename() {
    
       if(global_rank == 0)