# HG changeset patch # User Me@portablequad # Date 1329016837 28800 # Node ID 32489b8b763ce3d9cb0bb2c3992289d7dce2dfeb # Parent 1fbaedaac2c7ae1f907568745cabf696b75b398a added MC_shared brch diff -r 1fbaedaac2c7 -r 32489b8b763c .brch__MC_shared --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.brch__MC_shared Sat Feb 11 19:20:37 2012 -0800 @@ -0,0 +1,4 @@ +This branch is for the project structure defined Jan 2012.. the #includes reflect this directory structure. + +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. + diff -r 1fbaedaac2c7 -r 32489b8b763c .brch__default --- a/.brch__default Sat Feb 11 19:19:06 2012 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -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. \ No newline at end of file diff -r 1fbaedaac2c7 -r 32489b8b763c DblHist.c --- a/DblHist.c Sat Feb 11 19:19:06 2012 -0800 +++ b/DblHist.c Sat Feb 11 19:20:37 2012 -0800 @@ -28,8 +28,8 @@ DblHist *hist; int i; - hist = malloc( sizeof(DblHist) ); - hist->bins = malloc( numBins * sizeof(int) ); + hist = VMS__malloc( sizeof(DblHist) ); + hist->bins = VMS__malloc( numBins * sizeof(int) ); hist->numBins = numBins; hist->binWidth = binWidth; @@ -102,6 +102,6 @@ void freeDblHist( DblHist *hist ) { - free( hist->bins ); - free( hist ); + VMS__free( hist->bins ); + VMS__free( hist ); } diff -r 1fbaedaac2c7 -r 32489b8b763c FloatHist.c --- a/FloatHist.c Sat Feb 11 19:19:06 2012 -0800 +++ b/FloatHist.c Sat Feb 11 19:20:37 2012 -0800 @@ -26,8 +26,8 @@ FloatHist *hist; int i; - hist = malloc( sizeof(FloatHist) ); - hist->bins = malloc( numBins * sizeof(int) ); + hist = VMS__malloc( sizeof(FloatHist) ); + hist->bins = VMS__malloc( numBins * sizeof(int) ); hist->numBins = numBins; hist->binWidth = binWidth; @@ -100,6 +100,6 @@ void freeFloatHist( FloatHist *hist ) { - free( hist->bins ); - free( hist ); + VMS__free( hist->bins ); + VMS__free( hist ); } diff -r 1fbaedaac2c7 -r 32489b8b763c Histogram.c --- a/Histogram.c Sat Feb 11 19:19:06 2012 -0800 +++ b/Histogram.c Sat Feb 11 19:20:37 2012 -0800 @@ -35,8 +35,8 @@ int32 i; - hist = malloc( sizeof(Histogram) ); - hist->bins = malloc( numBins * sizeof(int32) ); + hist = VMS__malloc( sizeof(Histogram) ); + hist->bins = VMS__malloc( numBins * sizeof(int32) ); hist->numBins = numBins; hist->binWidth = (endOfRange - startOfRange) / numBins; @@ -72,16 +72,16 @@ { Histogram *hist; - hist = malloc( sizeof(Histogram) ); - hist->bins = malloc( numBins * sizeof(int32) ); + hist = VMS__malloc( sizeof(Histogram) ); + hist->bins = VMS__malloc( numBins * sizeof(int32) ); - makeHist_helper( hist, numBins, startOfRange, binWidth,strDup(name)); + makeHist_helper( hist, numBins, startOfRange, binWidth,VMS__strDup(name)); return hist; } Histogram * -makeFixedBinHist( int32 numBins, int32 startOfRange, int32 binWidth, +makeFixedBinHistExt( int32 numBins, int32 startOfRange, int32 binWidth, char *name ) { @@ -346,6 +346,13 @@ void freeHist( Histogram *hist ) { + VMS__free( hist->bins ); + VMS__free( hist->name ); + VMS__free( hist ); + } +void +freeHistExt( Histogram *hist ) + { free( hist->bins ); free( hist->name ); free( hist ); diff -r 1fbaedaac2c7 -r 32489b8b763c Histogram.h --- a/Histogram.h Sat Feb 11 19:19:06 2012 -0800 +++ b/Histogram.h Sat Feb 11 19:20:37 2012 -0800 @@ -6,7 +6,9 @@ * */ -#include "primitive_data_types.h" +#include "../../VMS_Implementations/VMS_impl/VMS.h" +#include "../../VMS_Implementations/VMS_impl/vmalloc.h" +#include "../../VMS_Implementations/VMS_impl/vutilities.h" #ifndef _HISTOGRAM_H #define _HISTOGRAM_H diff -r 1fbaedaac2c7 -r 32489b8b763c primitive_data_types.h --- a/primitive_data_types.h Sat Feb 11 19:19:06 2012 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* - * Copyright 2009 OpenSourceStewardshipFoundation.org - * Licensed under GNU General Public License version 2 - * - * Author: seanhalle@yahoo.com - * - - */ - -#ifndef _BLIS_PRIMITIVE_DATA_TYPES_H -#define _BLIS_PRIMITIVE_DATA_TYPES_H - - -/*For portability, need primitive data types that have a well defined - * size, and well-defined layout into bytes - *To do this, provide BLIS standard aliases for all primitive data types - *These aliases must be used in all BLIS functions instead of the ANSI types - * - *These definitions will be replaced inside each specialization module - * according to the compiler used in that module and the hardware being - * specialized to. - */ -/* -#define int8 char -#define uint8 char -#define int16 short -#define uint16 unsigned short -#define int32 int -#define uint32 unsigned int -#define int64 long long -#define uint64 unsigned long long -#define float32 float -#define float64 double -*/ -typedef char bool8; -typedef char int8; -typedef char uint8; -typedef short int16; -typedef unsigned short uint16; -typedef int int32; -typedef unsigned int uint32; -typedef long long int64; -typedef unsigned long long uint64; -typedef float float32; -typedef double float64; -//typedef double double float128; -#define float128 double double - -#define TRUE 1 -#define FALSE 0 - -#endif /* _BLIS_PRIMITIVE_DATA_TYPES_H */ -