-
Notifications
You must be signed in to change notification settings - Fork 2
/
PreDefinedAlgorithms.m
38 lines (30 loc) · 1.65 KB
/
PreDefinedAlgorithms.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(*******************************************************************************
* (C) Copyright IBM Corporation 2017
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Algorithms & Machines team
*******************************************************************************)
(* Mathematica Package *)
BeginPackage["PreDefinedAlgorithms`"]
(* Exported symbols added here with SymbolName::usage *)
Needs["ExaBoundsGeneric`"]; (* Generic package for all CDF/PDF functions *)
Needs["AlgorithmProperties`"];
LoadPreDefinedAlgorithms::usage =
"LoadPreDefinedAlgorithms[algInfoStructure_]"
Begin["`Private`"] (* Begin Private Context *)
(* Append algorithms to alInfostructure *)
(* NOTE: we do not append data to ExaBoundsState as was don in the original notebook, this data does not belong there *)
LoadPreDefinedAlgorithms[algInfoStructure_] :=
Module[{},
(* Load two default algorithms *)
Quiet[AddAlgorithm[algInfoStructure, FileNameJoin[{ExaBoundsDirectory[], "Algorithms", "Default", "graph500-seq-csr-s15-e16.out"}]], {AlgorithmFromFileJSON`LoadAlgorithmJSON::missingproperties, InstructionMix`TestInstrMix::nm}];
Quiet[AddAlgorithm[algInfoStructure, FileNameJoin[{ExaBoundsDirectory[], "Algorithms", "Default", "graph500-seq-list-s15-e16.out"}]], {AlgorithmFromFileJSON`LoadAlgorithmJSON::missingproperties, InstructionMix`TestInstrMix::nm}];
];
SetAttributes[LoadPreDefinedAlgorithms,HoldFirst];
End[] (* End Private Context *)
EndPackage[]