Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NexusCPP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Libraries
NexusCPP
Commits
4dadd8d4
Commit
4dadd8d4
authored
Dec 9, 2016
by
Xavier ELATTAOUI
Browse files
Options
Downloads
Plain Diff
Release version
parents
b964189f
2ee1cf8e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
src/impl/linux_nxfile.cpp
+19
-10
19 additions, 10 deletions
src/impl/linux_nxfile.cpp
with
20 additions
and
11 deletions
pom.xml
+
1
−
1
View file @
4dadd8d4
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</parent>
</parent>
<groupId>
fr.soleil.lib
</groupId>
<groupId>
fr.soleil.lib
</groupId>
<artifactId>
NexusCPP-${aol}-${library}-${mode}
</artifactId>
<artifactId>
NexusCPP-${aol}-${library}-${mode}
</artifactId>
<version>
3.1.
7
</version>
<version>
3.1.
6
</version>
<packaging>
nar
</packaging>
<packaging>
nar
</packaging>
<name>
NexusCPP
</name>
<name>
NexusCPP
</name>
<description>
NexusCPP library
</description>
<description>
NexusCPP library
</description>
...
...
This diff is collapsed.
Click to expand it.
src/impl/linux_nxfile.cpp
+
19
−
10
View file @
4dadd8d4
...
@@ -779,10 +779,9 @@ public:
...
@@ -779,10 +779,9 @@ public:
m_lock_ptr
.
reset
(
new
yat
::
LockFile
(
yat
::
FileName
(
path
),
yat
::
LockFile
::
READ
)
);
m_lock_ptr
.
reset
(
new
yat
::
LockFile
(
yat
::
FileName
(
path
),
yat
::
LockFile
::
READ
)
);
else
if
(
NexusFile
::
WRITE
)
else
if
(
NexusFile
::
WRITE
)
m_lock_ptr
.
reset
(
new
yat
::
LockFile
(
yat
::
FileName
(
path
),
yat
::
LockFile
::
WRITE
)
);
m_lock_ptr
.
reset
(
new
yat
::
LockFile
(
yat
::
FileName
(
path
),
yat
::
LockFile
::
WRITE
)
);
else
throw
NexusException
(
"unknown open mode"
,
"NexusFileImpl::NexusFileImpl"
);
}
}
if
(
yat
::
FileName
(
path
).
file_exist
()
&&
mode
!=
NexusFile
::
NONE
)
Open
(
path
,
mode
);
Open
(
path
,
mode
);
}
}
...
@@ -805,13 +804,12 @@ public:
...
@@ -805,13 +804,12 @@ public:
/// file related methods ... ///
/// file related methods ... ///
////////////////////////////////
////////////////////////////////
void
Create
(
const
std
::
string
&
path
,
ENexusCreateMode
mode
)
void
Create
(
const
std
::
string
&
path
)
{
{
NXFILE_LOCK
;
NXFILE_LOCK
;
NXFILEIMPL_COUT
(
"Create"
);
NXFILEIMPL_COUT
(
"Create"
);
if
(
mode
!=
NX_HDF5
)
throw
NexusException
(
"unsupported creation mode"
,
"NexusFileImpl::Create"
);
PrivOpenFile
(
path
,
H5F_ACC_TRUNC
);
PrivOpenFile
(
path
,
H5F_ACC_TRUNC
);
PrivCloseFile
();
}
}
bool
Open
(
const
std
::
string
&
path
,
NexusFile
::
OpenMode
mode
)
bool
Open
(
const
std
::
string
&
path
,
NexusFile
::
OpenMode
mode
)
...
@@ -1549,8 +1547,19 @@ private:
...
@@ -1549,8 +1547,19 @@ private:
/// create data set
/// create data set
hsize_t
dataDims
[
MAX_DATASET_NDIMS
];
hsize_t
dataDims
[
MAX_DATASET_NDIMS
];
std
::
copy
(
dim
,
dim
+
rank
,
dataDims
);
std
::
copy
(
dim
,
dim
+
rank
,
dataDims
);
H5
::
DataSpace
dataSpace
(
rank
,
dataDims
);
H5
::
DataSpace
dataSpace
;
H5
::
DataSet
dataset
=
group
->
createDataSet
(
name
,
nexusData2h5Data
(
dataType
),
dataSpace
,
props
);
H5
::
DataType
memDataType
;
if
(
NX_CHAR
==
dataType
&&
1
==
rank
)
{
// Characters string
memDataType
=
H5
::
StrType
(
0
,
dim
[
0
]
==
0
?
1
:
dim
[
0
]);
}
else
{
dataSpace
=
H5
::
DataSpace
(
rank
,
dataDims
);
memDataType
=
nexusData2h5Data
(
dataType
);
}
H5
::
DataSet
dataset
=
group
->
createDataSet
(
name
,
memDataType
,
dataSpace
,
props
);
/// push it
/// push it
if
(
open
)
if
(
open
)
PushTop
(
new
H5
::
DataSet
(
dataset
));
PushTop
(
new
H5
::
DataSet
(
dataset
));
...
@@ -1751,9 +1760,9 @@ void NexusFile::Flush()
...
@@ -1751,9 +1760,9 @@ void NexusFile::Flush()
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// NexusFile::Create
// NexusFile::Create
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
NexusFile
::
Create
(
const
char
*
pcszFullPath
,
ENexusCreateMode
eMode
)
void
NexusFile
::
Create
(
const
char
*
pcszFullPath
,
ENexusCreateMode
)
{
{
m_pImpl
->
Create
(
pcszFullPath
,
eMode
);
m_pImpl
->
Create
(
pcszFullPath
);
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment