Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-orbit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Katerina Roukounaki
cloud-orbit
Commits
eda5fcc6
Commit
eda5fcc6
authored
Nov 14, 2014
by
Aggelos Giantsios
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add module to define all the types we use
parent
c598399b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
10 deletions
+63
-10
Sequential.hs
Sequential.hs
+24
-4
Table.hs
Table.hs
+13
-6
Types.hs
Types.hs
+26
-0
No files found.
Sequential.hs
View file @
eda5fcc6
...
@@ -4,12 +4,32 @@
...
@@ -4,12 +4,32 @@
module
Sequential
(
Generator
module
Sequential
(
Generator
,
orbit
)
where
,
orbit
)
where
import
Table
(
Freq
,
Stats
,
VTable
,
Vertex
,
get_freq
,
freq_to_stat
,
is_member
,
insert
,
new
,
to_list
)
import
Data.Hashable
import
Data.Hashable
(
hash
)
(
hash
import
Data.Dequeue
(
BankersDequeue
,
fromList
,
popFront
,
pushBack
)
)
import
Data.Dequeue
(
BankersDequeue
,
fromList
,
popFront
,
pushBack
)
import
Table
(
get_freq
,
freq_to_stat
,
is_member
,
insert
,
new
,
to_list
)
import
OrbitUtils
(
now
)
import
OrbitUtils
(
now
)
import
Types
(
Generator
,
Freq
,
Stats
,
Vertex
,
VTable
)
type
Generator
=
Vertex
->
Vertex
type
Conf
=
([
Generator
],
Int
)
type
Conf
=
([
Generator
],
Int
)
-- DATA
-- DATA
...
...
Table.hs
View file @
eda5fcc6
...
@@ -22,12 +22,19 @@ module Table( Freq
...
@@ -22,12 +22,19 @@ module Table( Freq
,
freq_from_stat
,
freq_from_stat
,
fill_deg
)
where
,
fill_deg
)
where
import
Data.Array
(
Array
,
elems
,
listArray
,
(
!
),
(
//
))
import
Data.Array
(
Array
type
Freq
=
[
Int
]
,
elems
type
Vertex
=
Int
,
listArray
type
VTable
=
Array
Int
[
Vertex
]
,
(
!
)
type
Stats
=
[(
String
,
String
)]
,
(
//
)
)
import
Types
(
Freq
,
Stats
,
Vertex
,
VTable
)
-- Note: Hash tables have a fixed number of slots but each slot can store
-- Note: Hash tables have a fixed number of slots but each slot can store
-- a list of vertices. The functions is_member/3 and insert/3
-- a list of vertices. The functions is_member/3 and insert/3
...
...
Types.hs
0 → 100644
View file @
eda5fcc6
--
-- orbit-int types
--
module
Types
(
Generator
,
Freq
,
Host
,
MaybeHosts
(
..
)
,
Stats
,
Vertex
,
VTable
)
where
import
Data.Array
(
Array
)
import
Control.Distributed.Process
(
NodeId
)
type
Freq
=
[
Int
]
type
Vertex
=
Int
type
VTable
=
Array
Int
[
Vertex
]
type
Stats
=
[(
String
,
String
)]
type
Generator
=
Vertex
->
Vertex
type
Host
=
(
NodeId
,
Int
,
Int
,
Int
)
-- Node, Procs, TableSize, IdleTimeout
data
MaybeHosts
=
Seq
Int
|
Par
[
Host
]
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