changeset 15:32489b8b763c

added MC_shared brch
author Me@portablequad
date Sat, 11 Feb 2012 19:20:37 -0800
parents 1fbaedaac2c7
children f4d96eaf374a
files .brch__MC_shared .brch__default DblHist.c FloatHist.c Histogram.c Histogram.h primitive_data_types.h
diffstat 7 files changed, 28 insertions(+), 69 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.brch__MC_shared	Sat Feb 11 19:20:37 2012 -0800
     1.3 @@ -0,0 +1,4 @@
     1.4 +This branch is for the project structure defined Jan 2012..  the #includes reflect this directory structure.
     1.5 +
     1.6 +More importantly, the MC_shared  version of VMS requires a separat malloc implemeted by VMS code..  so this branch has modified the library to use the VMS-specific malloc.
     1.7 +
     2.1 --- a/.brch__default	Sat Feb 11 19:19:06 2012 -0800
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,1 +0,0 @@
     2.4 -The default branch is for use with normal C code.  Other branches specialize the library for use with VMS..  they may need VMS header files, and the working directory may be located at various different positions relative to the VMS implementation.
     2.5 \ No newline at end of file
     3.1 --- a/DblHist.c	Sat Feb 11 19:19:06 2012 -0800
     3.2 +++ b/DblHist.c	Sat Feb 11 19:20:37 2012 -0800
     3.3 @@ -28,8 +28,8 @@
     3.4     DblHist *hist;
     3.5     int i;
     3.6  
     3.7 -   hist = malloc( sizeof(DblHist) );
     3.8 -   hist->bins = malloc( numBins * sizeof(int) );
     3.9 +   hist = VMS__malloc( sizeof(DblHist) );
    3.10 +   hist->bins = VMS__malloc( numBins * sizeof(int) );
    3.11  
    3.12     hist->numBins      = numBins;
    3.13     hist->binWidth     = binWidth;
    3.14 @@ -102,6 +102,6 @@
    3.15  void
    3.16  freeDblHist( DblHist *hist )
    3.17   {
    3.18 -   free( hist->bins );
    3.19 -   free( hist );
    3.20 +   VMS__free( hist->bins );
    3.21 +   VMS__free( hist );
    3.22   }
     4.1 --- a/FloatHist.c	Sat Feb 11 19:19:06 2012 -0800
     4.2 +++ b/FloatHist.c	Sat Feb 11 19:20:37 2012 -0800
     4.3 @@ -26,8 +26,8 @@
     4.4     FloatHist *hist;
     4.5     int i;
     4.6  
     4.7 -   hist = malloc( sizeof(FloatHist) );
     4.8 -   hist->bins = malloc( numBins * sizeof(int) );
     4.9 +   hist = VMS__malloc( sizeof(FloatHist) );
    4.10 +   hist->bins = VMS__malloc( numBins * sizeof(int) );
    4.11  
    4.12     hist->numBins      = numBins;
    4.13     hist->binWidth     = binWidth;
    4.14 @@ -100,6 +100,6 @@
    4.15  void
    4.16  freeFloatHist( FloatHist *hist )
    4.17   {
    4.18 -   free( hist->bins );
    4.19 -   free( hist );
    4.20 +   VMS__free( hist->bins );
    4.21 +   VMS__free( hist );
    4.22   }
     5.1 --- a/Histogram.c	Sat Feb 11 19:19:06 2012 -0800
     5.2 +++ b/Histogram.c	Sat Feb 11 19:20:37 2012 -0800
     5.3 @@ -35,8 +35,8 @@
     5.4     int32 i;
     5.5  
     5.6  
     5.7 -   hist = malloc( sizeof(Histogram) );
     5.8 -   hist->bins = malloc( numBins * sizeof(int32) );
     5.9 +   hist = VMS__malloc( sizeof(Histogram) );
    5.10 +   hist->bins = VMS__malloc( numBins * sizeof(int32) );
    5.11  
    5.12     hist->numBins      = numBins;
    5.13     hist->binWidth     = (endOfRange - startOfRange) / numBins;
    5.14 @@ -72,16 +72,16 @@
    5.15   {
    5.16     Histogram *hist;
    5.17  
    5.18 -   hist = malloc( sizeof(Histogram) );
    5.19 -   hist->bins = malloc( numBins * sizeof(int32) );
    5.20 +   hist = VMS__malloc( sizeof(Histogram) );
    5.21 +   hist->bins = VMS__malloc( numBins * sizeof(int32) );
    5.22  
    5.23 -   makeHist_helper( hist, numBins, startOfRange, binWidth,strDup(name));
    5.24 +   makeHist_helper( hist, numBins, startOfRange, binWidth,VMS__strDup(name));
    5.25  
    5.26     return hist;
    5.27   }
    5.28  
    5.29  Histogram *
    5.30 -makeFixedBinHist( int32 numBins, int32 startOfRange, int32 binWidth,
    5.31 +makeFixedBinHistExt( int32 numBins, int32 startOfRange, int32 binWidth,
    5.32                       char *name )
    5.33  
    5.34   {
    5.35 @@ -346,6 +346,13 @@
    5.36  void
    5.37  freeHist( Histogram *hist )
    5.38   {
    5.39 +   VMS__free( hist->bins );
    5.40 +   VMS__free( hist->name );
    5.41 +   VMS__free( hist );
    5.42 + }
    5.43 +void
    5.44 +freeHistExt( Histogram *hist )
    5.45 + {
    5.46     free( hist->bins );
    5.47     free( hist->name );
    5.48     free( hist );
     6.1 --- a/Histogram.h	Sat Feb 11 19:19:06 2012 -0800
     6.2 +++ b/Histogram.h	Sat Feb 11 19:20:37 2012 -0800
     6.3 @@ -6,7 +6,9 @@
     6.4   * 
     6.5   */
     6.6  
     6.7 -#include "primitive_data_types.h"
     6.8 +#include "../../VMS_Implementations/VMS_impl/VMS.h"
     6.9 +#include "../../VMS_Implementations/VMS_impl/vmalloc.h"
    6.10 +#include "../../VMS_Implementations/VMS_impl/vutilities.h"
    6.11  
    6.12  #ifndef _HISTOGRAM_H
    6.13  #define	_HISTOGRAM_H
     7.1 --- a/primitive_data_types.h	Sat Feb 11 19:19:06 2012 -0800
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,53 +0,0 @@
     7.4 -/*
     7.5 - *  Copyright 2009 OpenSourceStewardshipFoundation.org
     7.6 - *  Licensed under GNU General Public License version 2
     7.7 - *  
     7.8 - * Author: seanhalle@yahoo.com
     7.9 - *  
    7.10 -
    7.11 - */
    7.12 -
    7.13 -#ifndef _BLIS_PRIMITIVE_DATA_TYPES_H
    7.14 -#define	_BLIS_PRIMITIVE_DATA_TYPES_H
    7.15 -
    7.16 -
    7.17 -/*For portability, need primitive data types that have a well defined
    7.18 - * size, and well-defined layout into bytes
    7.19 - *To do this, provide BLIS standard aliases for all primitive data types
    7.20 - *These aliases must be used in all BLIS functions instead of the ANSI types
    7.21 - *
    7.22 - *These definitions will be replaced inside each specialization module
    7.23 - * according to the compiler used in that module and the hardware being
    7.24 - * specialized to.
    7.25 - */
    7.26 -/*
    7.27 -#define    int8  char
    7.28 -#define   uint8  char
    7.29 -#define    int16 short
    7.30 -#define   uint16 unsigned short
    7.31 -#define    int32 int
    7.32 -#define   uint32 unsigned int
    7.33 -#define    int64 long long
    7.34 -#define   uint64 unsigned long long
    7.35 -#define  float32 float
    7.36 -#define  float64 double
    7.37 -*/
    7.38 -typedef char               bool8;
    7.39 -typedef char               int8;
    7.40 -typedef char               uint8;
    7.41 -typedef short              int16;
    7.42 -typedef unsigned short     uint16;
    7.43 -typedef int                int32;
    7.44 -typedef unsigned int       uint32;
    7.45 -typedef long long          int64;
    7.46 -typedef unsigned long long uint64;
    7.47 -typedef float              float32;
    7.48 -typedef double             float64;
    7.49 -//typedef double double      float128;
    7.50 -#define float128 double double
    7.51 -
    7.52 -#define TRUE  1
    7.53 -#define FALSE 0
    7.54 -
    7.55 -#endif	/* _BLIS_PRIMITIVE_DATA_TYPES_H */
    7.56 -