Skip to content

Commit

Permalink
1 10 Fix java data export functions (#450)
Browse files Browse the repository at this point in the history
* HDFFV-10865 - merge from dev, HDFArray perf fix.

* Remove duplicate setting

* Whitespace changes after clang format

* Undo version 11 clang format changes

* Merge CMake changes from develop

* test testing script merge from develop

* Update supported platforms

* PR#3 merge from develop

* Merge gcc 10 diagnostics option from develop

* Merge #318 OSX changes from develop

* Merge small changes from develop

* Minor non-space formatting changes

* #386 copyright corrections for java folder

* Merges from develop

#358 patches from vtk
#361 fix header guard spelling

* Merge updates

#358 patches from vtk
#361 fix header guard spelling

* format fix

* Fix missing underscore and make H5public.h closer to dev

* Merges from develop

#340 clang -Wformat-security warnings
#360 Fixed uninitialized warnings
header guard underscore cleanup
JNI cleanup

* format alignment

* Add missing test ref file

* Merge #380 from develop

* Finish java merges from develop

* Fix java issues with tests and javadoc

* Correct use of attribute access plist

* Remove debug code

* Remove unused variable

* Change file access to read only for java tests

* Split clang format operations.

* More javadoc comments

* Remove pre-split setting

* format source
  • Loading branch information
byrnHDF authored Mar 10, 2021
1 parent 2524ad1 commit dd5b8a8
Show file tree
Hide file tree
Showing 98 changed files with 1,339 additions and 1,041 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: clang-format Check
on: [workflow_dispatch, push, pull_request]
on:
pull_request:
jobs:
formatting-check:
name: Formatting Check
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/clang-format-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: clang-format Check
on:
workflow_dispatch:
push:
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C programs.
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
extensions: 'c,h,cpp,hpp'
clangFormatVersion: 10
inplace: True
style: file
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'
- uses: EndBug/add-and-commit@v7
with:
author_name: github-actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'Committing clang-format changes'
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

./.clang-format
./.github/CODEOWNERS _DO_NOT_DISTRIBUTE_
./.github/workflows/clang-format-fix.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/clang-format-check.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/main.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/pr-check.yml _DO_NOT_DISTRIBUTE_
Expand Down
10 changes: 5 additions & 5 deletions java/examples/datasets/H5Ex_D_Alloc.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ public static H5D_space_status get(int code) {
}

private static void allocation() {
long file_id = -1;
long filespace_id = -1;
long dataset_id1 = -1;
long dataset_id2 = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id1 = HDF5Constants.H5I_INVALID_HID;
long dataset_id2 = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
int space_status = 0;
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Checksum.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ private static boolean checkFletcher32Filter() {
}

private static void writeChecksum() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -192,9 +192,9 @@ private static void writeChecksum() {
}

private static void readChecksum() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
16 changes: 8 additions & 8 deletions java/examples/datasets/H5Ex_D_Chunk.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public static H5D_layout get(int code) {
}

private static void writeChunk() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -200,10 +200,10 @@ private static void writeChunk() {
}

private static void readChunk() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
16 changes: 8 additions & 8 deletions java/examples/datasets/H5Ex_D_Compact.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public static H5D_layout get(int code) {
}

private static void writeCompact() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -162,10 +162,10 @@ private static void writeCompact() {
}

private static void readCompact() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open file and dataset using the default properties.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_External.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ public class H5Ex_D_External {
private static final int NAME_BUF_SIZE = 32;

private static void writeExternal() {
long file_id = -1;
long dcpl_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -137,9 +137,9 @@ private static void writeExternal() {
}

private static void readExternal() {
long file_id = -1;
long dcpl_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
String[] Xname = new String[1];

Expand Down
8 changes: 4 additions & 4 deletions java/examples/datasets/H5Ex_D_FillValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public class H5Ex_D_FillValue {
private static final int FILLVAL = 99;

private static void fillValue() {
long file_id = -1;
long dcpl_id = -1;
long dataspace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] extdims = { EDIM_X, EDIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Gzip.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ private static boolean checkGzipFilter() {
}

private static void writeGzip() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -195,9 +195,9 @@ private static void writeGzip() {
}

private static void readGzip() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Hyperslab.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public class H5Ex_D_Hyperslab {
private static final int RANK = 2;

private static void writeHyperslab() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -141,10 +141,10 @@ private static void writeHyperslab() {
}

private static void readHyperslab() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
16 changes: 8 additions & 8 deletions java/examples/datasets/H5Ex_D_Nbit.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ private static boolean checkNbitFilter() {
}

private static void writeData() throws Exception {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dtype_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dtype_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -156,9 +156,9 @@ private static void writeData() throws Exception {
}

private static void readData() throws Exception {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
10 changes: 5 additions & 5 deletions java/examples/datasets/H5Ex_D_ReadWrite.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public class H5Ex_D_ReadWrite {
private static final int RANK = 2;

private static void WriteDataset() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -108,8 +108,8 @@ private static void WriteDataset() {
}

private static void ReadDataset() {
long file_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open file using the default properties.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Shuffle.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ private static boolean checkShuffleFilter() {
}

private static void writeShuffle() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -228,9 +228,9 @@ private static void writeShuffle() {
}

private static void readShuffle() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Sofloat.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ private static boolean checkScaleoffsetFilter() {
}

private static void writeData() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
double[][] dset_data = new double[DIM_X][DIM_Y];
Expand Down Expand Up @@ -212,9 +212,9 @@ private static void writeData() {
}

private static void readData() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
double[][] dset_data = new double[DIM_X][DIM_Y];

// Open file using the default properties.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Soint.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ private static boolean checkScaleoffsetFilter() {
}

private static void writeData() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -194,9 +194,9 @@ private static void writeData() {
}

private static void readData() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open file using the default properties.
Expand Down
Loading

0 comments on commit dd5b8a8

Please sign in to comment.