File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
snaploader/src/main/java/electrostatic4j/snaploader/platform/util Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2023-2024 , The Electrostatic-Sandbox Distributed Simulation Framework, jSnapLoader
2+ * Copyright (c) 2023-2025 , The Electrostatic-Sandbox Distributed Simulation Framework, jSnapLoader
33 * All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
@@ -134,6 +134,19 @@ public PlatformPredicate(boolean predicate) {
134134 this .predicate = predicate ;
135135 }
136136
137+ /**
138+ * Instantiates a predicate object that combines a pre-existing predicate
139+ * with one or more instruction-set extensions. The result is true if and
140+ * only if the base predicate is true and all named extensions are present.
141+ *
142+ * @param base a pre-existing predicate (not null)
143+ * @param isaExtensions names of required ISA extensions
144+ */
145+ public PlatformPredicate (PlatformPredicate base , String ... isaExtensions ) {
146+ this .predicate = base .evaluatePredicate ()
147+ && NativeVariant .Cpu .hasExtensions (isaExtensions );
148+ }
149+
137150 /**
138151 * Evaluate the propositions of the predefined platform-predicate.
139152 *
You can’t perform that action at this time.
0 commit comments