Commit 7da71f9a authored by Ahmad Siavashi's avatar Ahmad Siavashi

Override isSuitable in GpuHost

parent 23c761c7
...@@ -5,6 +5,7 @@ import java.util.Set; ...@@ -5,6 +5,7 @@ import java.util.Set;
import org.cloudbus.cloudsim.Host; import org.cloudbus.cloudsim.Host;
import org.cloudbus.cloudsim.Pe; import org.cloudbus.cloudsim.Pe;
import org.cloudbus.cloudsim.Vm;
import org.cloudbus.cloudsim.VmScheduler; import org.cloudbus.cloudsim.VmScheduler;
import org.cloudbus.cloudsim.gpu.allocation.VideoCardAllocationPolicy; import org.cloudbus.cloudsim.gpu.allocation.VideoCardAllocationPolicy;
import org.cloudbus.cloudsim.provisioners.BwProvisioner; import org.cloudbus.cloudsim.provisioners.BwProvisioner;
...@@ -72,6 +73,15 @@ public class GpuHost extends Host { ...@@ -72,6 +73,15 @@ public class GpuHost extends Host {
return smallerTime; return smallerTime;
} }
@Override
public boolean isSuitableForVm(Vm vm) {
boolean result = vmCreate(vm);
if(result) {
vmDestroy(vm);
}
return result;
}
/** /**
* @return the videoCardAllocationPolicy * @return the videoCardAllocationPolicy
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment