Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BDIO.jl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alberto Ramos
BDIO.jl
Commits
58f09bc9
Commit
58f09bc9
authored
5 years ago
by
Alberto Ramos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added license and README.md
parent
9df37cbb
Pipeline
#63
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
0 deletions
+58
-0
LICENSE
LICENSE
+5
-0
README.md
README.md
+53
-0
No files found.
LICENSE
0 → 100644
View file @
58f09bc9
> "THE BEER-WARE LICENSE":
> Alberto Ramos wrote this file. As long as you retain this
> notice you can do whatever you want with this stuff. If we meet some
> day, and you think this stuff is worth it, you can buy me a beer in
> return. <alberto.ramos@cern.ch>
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
View file @
58f09bc9
# BDIO.jl
BDIO.jl is a package to write/read
[
BDIO
](
http://bdio.org
)
(
**B**inary
**D**
ata
**I**
nput/
**O**
utput) files.
The test1.jl file in the
`tests`
directory gives a simple example on
the usage of the package
```
julia
julia
>
BDIO_set_user
(
"alberto"
)
julia
>
BDIO_set_host
(
"laptop"
)
julia
>
fb
=
BDIO_open
(
"foo.bdio"
,
"w"
,
"Test file"
)
julia
>
BDIO_start_record!
(
fb
,
BDIO_BIN_INT64LE
,
1
,
true
)
julia
>
BDIO_write!
(
fb
,
collect
(
1
:
1000
))
julia
>
BDIO_write_hash!
(
fb
)
julia
>
BDIO_start_record!
(
fb
,
BDIO_BIN_F64LE
,
2
,
true
)
julia
>
vec1
=
randn
(
1000
)
julia
>
vec2
=
similar
(
vec1
)
julia
>
vec2
.=
.-
vec1
julia
>
BDIO_write!
(
fb
,
vec1
)
julia
>
BDIO_write!
(
fb
,
vec2
)
julia
>
BDIO_write_hash!
(
fb
)
julia
>
BDIO_close!
(
fb
)
julia
>
fb2
=
BDIO_open
(
"foo.bdio"
,
"r"
)
julia
>
global
isum
=
0
julia
>
global
fsum
=
0.0
julia
>
while
BDIO_seek!
(
fb2
)
julia
>
if
BDIO_get_uinfo
(
fb2
)
==
1
julia
>
idt
=
similar
(
Array
{
Int64
,
1
},
100
)
julia
>
for
i
=
1
:
10
julia
>
BDIO_read
(
fb2
,
idt
)
julia
>
global
isum
+=
sum
(
idt
)
julia
>
end
julia
>
elseif
BDIO_get_uinfo
(
fb2
)
==
2
julia
>
fdt
=
similar
(
Array
{
Float64
,
1
},
100
)
julia
>
for
i
=
1
:
20
julia
>
BDIO_read
(
fb2
,
fdt
)
julia
>
global
fsum
+=
sum
(
fdt
)
julia
>
end
julia
>
end
julia
>
end
julia
>
rm
(
"foo.bdio"
,
force
=
true
)
julia
>
(
(
abs
(
fsum
)
<
1.0E-10
)
&&
((
2
*
isum
-
1000
*
(
1001
))
==
0
)
)
```
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment