Skip to content

Vector#48

Merged
gsvgit merged 78 commits intoSparseLinearAlgebra:net5from
IgorErin:vector
Nov 19, 2022
Merged

Vector#48
gsvgit merged 78 commits intoSparseLinearAlgebra:net5from
IgorErin:vector

Conversation

@IgorErin
Copy link
Copy Markdown
Contributor

@IgorErin IgorErin commented Oct 31, 2022

Proposed Changes

  • Vector operations:
    • zeroCreate
    • ofList
    • copy
    • mask
    • elementWise
    • elementwiseAtLeasone
    • fillSubVector
    • fillSubVectorComplemented
    • reduce

Types of changes

What types of changes does your code introduce to GraphBLAS-sharp?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Build and tests pass locally
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

|> Array.sortBy fst
|> Array.unzip

let resultLenght = (Array.max indices) + 1
Copy link
Copy Markdown
Contributor

@kirillgarbar kirillgarbar Nov 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for dense vector this is incorrect. In dense case ofList operation should create vector with zeroes and assign non-zero values by given indices. This means that number of indices can be lesser than size of the array and ofList should take vector size as a parameter


let result =
clContext.CreateClArray(
1,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case ClCell can be used instead of ClArray

| _, None -> left
| _ -> right @>

let maskOp<'a, 'b when 'a: struct and 'b: struct> =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complemented mask operation can also be added

@gsvgit gsvgit merged commit 617c402 into SparseLinearAlgebra:net5 Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants