Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 #6

Merged
merged 41 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
aea8340
Property storage re-work in progress
cpiker Jan 15, 2024
78ad919
Draft reworked properties descriptor
cpiker Jan 18, 2024
5dde71c
das2/3 descriptors compile
cpiker Jan 19, 2024
2272032
Using memory pool for property storage
cpiker Jan 21, 2024
784e880
Validating v2 test output with new properties
cpiker Jan 21, 2024
70ed802
New-style properties pass all unit tests
cpiker Jan 22, 2024
f550cfe
Draft das3 tag parsing
cpiker Jan 24, 2024
45c902f
das3 stream properties parsing works
cpiker Jan 24, 2024
98647fe
Var internal comp. defined, frame definitions added
cpiker Jan 28, 2024
fa6d574
Purpose of interal indexes well defined.
cpiker Jan 31, 2024
78f8389
Variables with internal structure pass unit tests
cpiker Jan 31, 2024
b0ec254
First draft code for das3 parser
cpiker Feb 14, 2024
8542616
Draft das3 parser builds
cpiker Feb 14, 2024
44ff737
Rank 3 header unittest passes
cpiker Feb 15, 2024
a173bf7
All data structure creation and printing tests pass
cpiker Feb 16, 2024
0fa6777
Draft data packet reader, debug in progress
cpiker Feb 16, 2024
2246a09
codec re-written to handle variable number of fixed length items per …
cpiker Feb 17, 2024
75b6df4
das3 parser passes first full stream unit test
cpiker Feb 17, 2024
1019c15
Started cdf writer, explicit stream model selection
cpiker Feb 17, 2024
9bac525
Allow das2 streams into das3 data models
cpiker Feb 17, 2024
c47e7bb
checkpoint: cdf writer devel
cpiker Feb 18, 2024
b125eae
Further work stream to CDF conversion
cpiker Feb 19, 2024
0e0d752
Can create headers and read data
cpiker Feb 19, 2024
4b29ddc
Draft CDF Writer variable output
cpiker Feb 22, 2024
2d9a65e
CDF creator can make vars, but dosen't fill them yet
cpiker Feb 22, 2024
c5dc423
CDF generator runs for rank 1 case
cpiker Feb 22, 2024
ef9c3e9
Complex CDF conversion, partial pass, needs work
cpiker Feb 23, 2024
4e509e2
Write rank-3 cdfs but dependences not assigned correctly
cpiker Feb 24, 2024
7378413
Dependencies fixed, time values are wrong
cpiker Feb 24, 2024
e4224a8
time struct->TT2k conversion, units improvements
cpiker Feb 24, 2024
72e2d80
Added CDF compression & CDF unittest
cpiker Feb 25, 2024
91dc116
Added make install target for das3_cdf
cpiker Feb 26, 2024
7f1c7b2
Finding libcdf via ENV vars
cpiker Feb 26, 2024
b9eaadb
Doxygen updates, still working on function groups
cpiker Feb 27, 2024
693d09d
First vector CDF test passes
cpiker Feb 28, 2024
1bbdbe8
First vector CDFs pass
cpiker Feb 29, 2024
4a9bba1
Better CDF label handling, release builds
cpiker Feb 29, 2024
0b2efc2
Handling null phydims and real props
cpiker Feb 29, 2024
61fb576
Updated cdf unittest, stray void removal
cpiker Feb 29, 2024
4940816
Added test cmd
cpiker Feb 29, 2024
46842f8
Merge remote-tracking branch 'origin' into 3.0
cpiker Feb 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "das2 core C utilities"
PROJECT_BRIEF = "das core C utilities (v3)"

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand Down Expand Up @@ -914,7 +914,7 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).

IMAGE_PATH =
IMAGE_PATH = notes

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down
28 changes: 21 additions & 7 deletions buildfiles/Linux.mak
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,30 @@ BD=$(BUILD_DIR)
LEX=flex
YACC=bison

DEFINES:=-DWISDOM_FILE=/etc/fftw/wisdom -D_XOPEN_SOURCE=600
WARNINGS:=-Wall -Werror -Wno-format-truncation -Wno-deprecated-declarations
#-Wno-format-security
# -Wno-deprecated needed for OpenSSL, removed when call to ERR_load_BIO_strings is fixed
WARNINGS:=-Wall -Werror -Wno-deprecated-declarations
#-Wno-format-security

# I use string trucation all the time intentianally and make sure it's null
# terminated anyway, so this error doesn't apply

DEFINES:=-DWISDOM_FILE=/etc/fftw/wisdom -D_XOPEN_SOURCE=600 -Wno-format-truncation

DBG_DEFINES=-ggdb
O2_DEFINES=-DNDEBUG -O2 -Wno-unused-result -Wno-stringop-truncation


# Conda build does NOT set the include and lib directories within the
# compiler script itself, it merely exports ENV vars. This is unfortunate
# because it means makefiles must be altered to work with anaconda.

ifeq ($(CONDA_BUILD_STATE),)

CC=gcc
CFLAGS= $(WARNINGS) -fPIC -std=c99 -I. -ggdb $(DEFINES)
#CFLAGS=-Wall -DNDEBUG -O2 -fPIC -std=c99 -Wno-format-security -I. $(DEFINES)
CC=gcc

CFLAGS= $(WARNINGS) $(DBG_DEFINES) $(DEFINES) -fPIC -std=c99 -I.
#CFLAGS=$(WARNINGS) $(O2_DEFINES) $(DEFINES) -fPIC -std=c99 -I.

#-fstack-protector-strong

#CTESTFLAGS=-Wall -fPIC -std=c99 -ggdb -I. $(CFLAGS)
Expand Down Expand Up @@ -168,7 +179,7 @@ $(BD)/das2_psd:$(BD)/das2_psd.o $(BD)/send.o $(BD)/$(TARG).a

cdf:$(BD)/das3_cdf

$(BD)/das3_cdf:$(BD)/das3_cdf.o
$(BD)/das3_cdf:$(BD)/das3_cdf.o $(BD)/$(TARG).a
@echo "An example CDF_INC value would be: /usr/local/include"
@echo "An example CDF_LIB value would be: /usr/local/lib/libcdf.a"
@if [ "$(CDF_INC)" = "" ] ; then echo "CDF_INC not set"; exit 3; fi
Expand Down Expand Up @@ -238,6 +249,9 @@ $(BD)/html:$(BD) $(BD)/$(TARG).a

install_doc:$(INST_DOC)/libdas2

clean_doc:
-rm -r $(BD)/html

$(INST_DOC)/libdas2:$(BD)/html
-mkdir -p $(INST_DOC)
@if [ -e "$(INST_DOC)/libdas2" ]; then rm -r $(INST_DOC)/libdas2; fi
Expand Down
14 changes: 9 additions & 5 deletions das2/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
extern "C" {
#endif

/** @addtogroup datasets
* @{
*/

/** The maximum number of array indices in das2 */
#define DASIDX_MAX 8

Expand Down Expand Up @@ -133,6 +129,9 @@ char* das_idx_prn(int nRank, ptrdiff_t* pIdx, size_t uLen, char* sBuf);
#define RNG_6(i,I,j,J,k,K,l,L,m,M,n,N) 6, (ptrdiff_t[6]){i,j,k,l,m,n}, (ptrdiff_t[6]){I,J,K,L,M,N}
#define RNG_7(i,I,j,J,k,K,l,L,m,M,n,N,o,O) 7, (ptrdiff_t[7]){i,j,k,l,m,n,o}, (ptrdiff_t[7]){I,J,K,L,M,N,O}

/** @addtogroup DM
* @{
*/

/** Calculate a strided array shape from a min/max range.
*
Expand Down Expand Up @@ -197,6 +196,10 @@ typedef struct dyna_buf{

} DynaBuf;

/** @addtogroup DM
* @{
*/

/** Dynamic recursive ragged arrays
*
* This class maps any number of indices, (i,j,k...) to elements stored into a
Expand Down Expand Up @@ -263,7 +266,6 @@ typedef struct dyna_buf{
* printf("\n");
* }
* @endcode
* @ingroup datasets
*/
typedef struct das_array {
char sId[DAS_MAX_ID_BUFSZ]; /* A text identifier of this instance of the array */
Expand Down Expand Up @@ -312,6 +314,8 @@ typedef struct das_array {

} DasAry;

/** @} */


/** Creates a new dynamic array buffer
*
Expand Down
6 changes: 2 additions & 4 deletions das2/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
extern "C" {
#endif

/** @addtogroup utilities
/** @addtogroup IO
* @{
*/

/** Little buffer class to handle accumulating string data.
/** Buffer class to handle accumulating byte streams
*
* DasBuf objects maintain a data buffer with a current write point, a current
* read point and an end read point. As data are written to the buffer the
Expand All @@ -43,8 +43,6 @@ extern "C" {
* memory buffer, or when multiple functions need to read from a buffer without
* memory re-allocations or placing null values to stop parsing.
*
* It is hoped that the use of this class cuts down on alot of data copies and
* sub-string allocations.
*/
typedef struct das_buffer{
char* sBuf;
Expand Down
3 changes: 3 additions & 0 deletions das2/codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,10 @@ static int _var_text_read(
return -1 * das_error(DASERR_ENC, "Expected a text type for the external buffer");
}

#ifndef NDEBUG
das_val_type vtAry = DasAry_valType( pThis->pAry );
#endif

bool bParse = ((pThis->uProc & DASENC_PARSE) != 0);
int nRet;
char cSep = pThis->cSep;
Expand Down
20 changes: 17 additions & 3 deletions das2/codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ extern "C" {
/* Not public, only here because used in a macro */
#define DASENC_VALID 0x0001

/** @addtogroup IO
* @{
*/

/** Reading and writing array data to buffers */
typedef struct das_codec {

Expand Down Expand Up @@ -59,7 +63,11 @@ typedef struct das_codec {

} DasCodec;

/** Has the memory for this encoder been initialized? */

/** Has the memory for this encoder been initialized?
*
* @memberof DasCodec
*/
#define DasCodec_isValid(pCd) (((pCd)->uProc & DASENC_VALID)==(DASENC_VALID))

/** Initialize a serial buffer decoder/encoder
Expand Down Expand Up @@ -106,6 +114,8 @@ typedef struct das_codec {
* Otherwise, no string larger then the last index will be written
* and zeros will be appended to fill out the last index when reading
* data.
*
* @memberof DasCodec
*/
DAS_API DasErrCode DasCodec_init(
DasCodec* pThis, DasAry* pAry, const char* sSemantic, const char* sEncType,
Expand Down Expand Up @@ -143,12 +153,16 @@ DAS_API DasErrCode DasCodec_init(
*
* @returns the number of unread bytes or a negative ERR code if a data conversion
* error occured.
* */
* @memberof DasCodec
*/
DAS_API int DasCodec_decode(
DasCodec* pThis, const ubyte* pBuf, int nBufLen, int nExpect, int* pValsRead
);

/** Release the reference count on the array given to this encoder/decoder */
/** Release the reference count on the array given to this encoder/decoder
*
* @memberof DasCodec
*/
DAS_API void DasCodec_deInit(DasCodec* pThis);

#ifdef __cplusplus
Expand Down
Loading
Loading