@@ -4,7 +4,7 @@ open Brahma.FSharp.OpenCL.WorkflowBuilder.Basic
44open Brahma.FSharp .OpenCL .WorkflowBuilder .Evaluation
55open GraphBLAS.FSharp .Backend
66
7- type MatrixTuples < 'a when 'a : struct and 'a : equality > =
7+ type MatrixTuples < 'a > =
88 {
99 RowIndices: int []
1010 ColumnIndices: int []
@@ -46,11 +46,41 @@ module Matrix =
4646 methods
4747 *)
4848
49+ let rowCount ( matrix : Matrix < 'a >) : int = failwith " Not Implemented yet"
50+ let columnCount ( matrix : Matrix < 'a >) : int = failwith " Not Implemented yet"
51+ let clear ( matrix : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
52+ let copy ( matrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> = failwith " Not Implemented yet"
53+ let resize ( rowCount : int ) ( columnCount : int ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> = failwith " Not Implemented yet"
54+ let nnz ( matrix : Matrix < 'a >) : GraphblasEvaluation < int > = failwith " Not Implemented yet"
55+ let tuples ( matrix : Matrix < 'a >) : GraphblasEvaluation < MatrixTuples < 'a >> = failwith " Not Implemented yet"
56+ let mask ( matrix : Matrix < 'a >) : GraphblasEvaluation < Mask2D option > = failwith " Not Implemented yet"
57+ let complemented ( matrix : Matrix < 'a >) : GraphblasEvaluation < Mask2D option > = failwith " Not Implemented yet"
58+ // let finish \ eval \ toHost
59+
60+ (*
61+ assignment, extraction and filling
62+ *)
63+
64+ let extractSubMatrix ( mask : Mask2D option ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> = failwith " Not Implemented yet"
65+ let extractSubRow ( rowIdx : int ) ( mask : Mask2D option ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Vector < 'a >> = failwith " Not Implemented yet"
66+ let extractSubCol ( colIdx : int ) ( mask : Mask2D option ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Vector < 'a >> = failwith " Not Implemented yet"
67+ let extractElement ( rowIdx : int ) ( colIdx : int ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Scalar < 'a >> = failwith " Not Implemented yet"
68+ let assignSubMatrix ( mask : Mask2D option ) ( source : Matrix < 'a >) ( target : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
69+ let assignSubRow ( rowIdx : int ) ( mask : Mask2D option ) ( source : Vector < 'a >) ( target : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
70+ let assignSubCol ( colIdx : int ) ( mask : Mask2D option ) ( source : Vector < 'a >) ( target : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
71+ let assignElement ( rowIdx : int ) ( colIdx : int ) ( source : Scalar < 'a >) ( target : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
72+ let fillSubMatrix ( mask : Mask2D option ) ( filler : Scalar < 'a >) ( matrix : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
73+ let fillSubRow ( rowIdx : int ) ( mask : Mask2D option ) ( filler : Scalar < 'a >) ( matrix : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
74+ let fillSubCol ( colIdx : int ) ( mask : Mask2D option ) ( filler : Scalar < 'a >) ( matrix : Matrix < 'a >) : GraphblasEvaluation < unit > = failwith " Not Implemented yet"
75+
4976 (*
5077 operations
5178 *)
5279
53- let eWiseAdd ( leftMatrix : Matrix < 'a >) ( rightMatrix : Matrix < 'a >) ( mask : Mask2D option ) ( semiring : ISemiring < 'a >) =
80+ let mxm ( semiring : ISemiring < 'a >) ( mask : Mask2D option ) ( leftMatrix : Matrix < 'a >) ( rightMatrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> = failwith " Not Implemented yet"
81+ let mxv ( semiring : ISemiring < 'a >) ( mask : Mask1D option ) ( matrix : Matrix < 'a >) ( vector : Vector < 'a >) : GraphblasEvaluation < Vector < 'a >> = failwith " Not Implemented yet"
82+
83+ let eWiseAdd ( semiring : ISemiring < 'a >) ( mask : Mask2D option ) ( leftMatrix : Matrix < 'a >) ( rightMatrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> =
5484 let operationResult =
5585 match leftMatrix, rightMatrix with
5686 | MatrixCOO left, MatrixCOO right ->
@@ -61,3 +91,12 @@ module Matrix =
6191 | _ -> failwith " Not Implemented"
6292
6393 graphblas { return ! EvalGB.liftCl operationResult }
94+
95+ let eWiseMult ( semiring : ISemiring < 'a >) ( mask : Mask2D option ) ( leftMatrix : Matrix < 'a >) ( rightMatrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> = failwith " Not Implemented yet"
96+ let apply ( mapper : UnaryOp < 'a , 'b >) ( mask : Mask2D option ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'b >> = failwith " Not Implemented yet"
97+ let prune ( predicate : UnaryOp < 'a , bool >) ( mask : Mask2D option ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> = failwith " Not Implemented yet"
98+ let reduceRows ( monoid : IMonoid < 'a >) ( mask : Mask1D ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Vector < 'a >> = failwith " Not Implemented yet"
99+ let reduceCols ( monoid : IMonoid < 'a >) ( mask : Mask1D ) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Vector < 'a >> = failwith " Not Implemented yet"
100+ let reduce ( monoid : IMonoid < 'a >) ( matrix : Matrix < 'a >) : GraphblasEvaluation < Scalar < 'a >> = failwith " Not Implemented yet"
101+ let transpose ( matrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'b >> = failwith " Not Implemented yet"
102+ let kronecker ( semiring : ISemiring < 'a >) ( mask : Mask2D option ) ( leftMatrix : Matrix < 'a >) ( rightMatrix : Matrix < 'a >) : GraphblasEvaluation < Matrix < 'a >> = failwith " Not Implemented yet"
0 commit comments