Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gpucloudsim
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LPDS
gpucloudsim
Commits
4f096fa3
Commit
4f096fa3
authored
Jun 09, 2022
by
Ahmad Siavashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relocate power and placement events
parent
693bcad3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
20 deletions
+8
-20
GpuDatacenterEx.java
.../org/cloudbus/cloudsim/gpu/placement/GpuDatacenterEx.java
+4
-10
PowerGpuDatacenter.java
...a/org/cloudbus/cloudsim/gpu/power/PowerGpuDatacenter.java
+4
-10
No files found.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/placement/GpuDatacenterEx.java
View file @
4f096fa3
...
@@ -14,8 +14,6 @@ import org.cloudbus.cloudsim.VmAllocationPolicy;
...
@@ -14,8 +14,6 @@ import org.cloudbus.cloudsim.VmAllocationPolicy;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.core.CloudSimTags
;
import
org.cloudbus.cloudsim.core.CloudSimTags
;
import
org.cloudbus.cloudsim.core.SimEvent
;
import
org.cloudbus.cloudsim.core.SimEvent
;
import
org.cloudbus.cloudsim.core.predicates.PredicateType
;
import
org.cloudbus.cloudsim.gpu.GpuDatacenter
;
import
org.cloudbus.cloudsim.gpu.GpuVm
;
import
org.cloudbus.cloudsim.gpu.GpuVm
;
import
org.cloudbus.cloudsim.gpu.GpuVmAllocationPolicy
;
import
org.cloudbus.cloudsim.gpu.GpuVmAllocationPolicy
;
import
org.cloudbus.cloudsim.gpu.Vgpu
;
import
org.cloudbus.cloudsim.gpu.Vgpu
;
...
@@ -59,13 +57,9 @@ public class GpuDatacenterEx extends PowerGpuDatacenter {
...
@@ -59,13 +57,9 @@ public class GpuDatacenterEx extends PowerGpuDatacenter {
}
}
@Override
@Override
public
void
processEvent
(
SimEvent
ev
)
{
public
void
startEntity
()
{
// if this is the first time processing happens
if
(
CloudSim
.
clock
()
==
0.0
&&
CloudSim
.
select
(
getId
(),
new
PredicateType
(
GpuCloudSimTags
.
GPU_VM_DATACENTER_PLACEMENT
))
==
null
)
{
schedule
(
getId
(),
getSchedulingInterval
(),
GpuCloudSimTags
.
GPU_VM_DATACENTER_PLACEMENT
);
schedule
(
getId
(),
getSchedulingInterval
(),
GpuCloudSimTags
.
GPU_VM_DATACENTER_PLACEMENT
);
}
super
.
startEntity
();
super
.
processEvent
(
ev
);
}
}
@Override
@Override
...
...
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/power/PowerGpuDatacenter.java
View file @
4f096fa3
...
@@ -9,9 +9,7 @@ import org.cloudbus.cloudsim.DatacenterCharacteristics;
...
@@ -9,9 +9,7 @@ import org.cloudbus.cloudsim.DatacenterCharacteristics;
import
org.cloudbus.cloudsim.Host
;
import
org.cloudbus.cloudsim.Host
;
import
org.cloudbus.cloudsim.Storage
;
import
org.cloudbus.cloudsim.Storage
;
import
org.cloudbus.cloudsim.VmAllocationPolicy
;
import
org.cloudbus.cloudsim.VmAllocationPolicy
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.core.SimEvent
;
import
org.cloudbus.cloudsim.core.SimEvent
;
import
org.cloudbus.cloudsim.core.predicates.PredicateType
;
import
org.cloudbus.cloudsim.gpu.GpuDatacenter
;
import
org.cloudbus.cloudsim.gpu.GpuDatacenter
;
import
org.cloudbus.cloudsim.gpu.VideoCard
;
import
org.cloudbus.cloudsim.gpu.VideoCard
;
import
org.cloudbus.cloudsim.gpu.allocation.VideoCardAllocationPolicy
;
import
org.cloudbus.cloudsim.gpu.allocation.VideoCardAllocationPolicy
;
...
@@ -94,13 +92,9 @@ public class PowerGpuDatacenter extends GpuDatacenter {
...
@@ -94,13 +92,9 @@ public class PowerGpuDatacenter extends GpuDatacenter {
}
}
@Override
@Override
public
void
processEvent
(
SimEvent
ev
)
{
public
void
startEntity
()
{
// if this is the first time processing happens
if
(
CloudSim
.
clock
()
==
0.0
&&
CloudSim
.
select
(
getId
(),
new
PredicateType
(
GpuCloudSimTags
.
GPU_VM_DATACENTER_POWER_EVENT
))
==
null
)
{
schedule
(
getId
(),
getSchedulingInterval
(),
GpuCloudSimTags
.
GPU_VM_DATACENTER_POWER_EVENT
);
schedule
(
getId
(),
getSchedulingInterval
(),
GpuCloudSimTags
.
GPU_VM_DATACENTER_POWER_EVENT
);
}
super
.
startEntity
();
super
.
processEvent
(
ev
);
}
}
@Override
@Override
...
...
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