Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 10 20:58

    mclow on boost-1.80.0

    (compare)

  • Aug 02 19:33
    bassoy commented #177
  • Aug 02 19:32

    bassoy on develop

    chore: bump macos runner versio… (compare)

  • Aug 02 19:32
    bassoy closed #177
  • Aug 02 10:10
    amitsingh19975 commented #175
  • Aug 02 10:06
    amitsingh19975 commented #175
  • Aug 02 10:00
    Zhaojun-Liu commented #175
  • Aug 02 08:43
    amitsingh19975 commented #175
  • Aug 02 02:28
    Zhaojun-Liu commented #175
  • Aug 01 13:40
    amitsingh19975 commented #175
  • Jul 25 13:25
    shikharvashistha review_requested #177
  • Jul 25 13:25
    shikharvashistha review_requested #177
  • Jul 25 13:25
    shikharvashistha review_requested #177
  • Jul 25 09:57
    renbaoshuo opened #177
  • Jul 13 20:12

    mclow on boost-1.80.0.beta1

    (compare)

  • Jun 09 13:41
    KurtAA42 opened #176
  • Jun 07 07:40
    Zhaojun-Liu opened #175
  • Jun 05 11:51
    apolukhin commented #153
  • May 19 09:22
    apolukhin commented #153
  • May 10 14:34
    SpareSimian commented #76
amitsingh19975
@amitsingh19975

In other words, I would have to implement this matrix header, using a 2nd order static_rank_tensor.

Unless the repo is already in a state where using matrix = static_rank_tensor<2,...> works. Is it ?

It is almost there. I need to refactor because there are some unclean parts.

@bassoy @amitsingh19975 could you kindly link me to the ongoing work (if there is any) on the new matrix class.

Type alias can be used but the error it generates isn't useful and it is very verbose for a normal user. The specialized class gives more control and a better error message. There is no new matrix class yet.

Laxman Desai
@relaxxpls

@amitsingh19975

Yes, there are two things that missing:

  1. Vector implementation

A Vector would just be a column or row of a matrix right? I.e. a matrix of {R, 1} or {1, C} dimensions, or should I update my implementation to create a new Vector class based off an array?

  1. Unit test in the test folder

Working on those right now. I'm new to the Boost Test Library, and I'll get back if I face any issues.

I have one questions for you why use the vector of vector?

I was comfortable with vectors. Upon deeper thought, a multidimentional-array based implementation would have worked better. I'll update my code to use the same!

amitsingh19975
@amitsingh19975

@amitsingh19975

Yes, there are two things that missing:

  1. Vector implementation

A Vector would just be a column or row of a matrix right? I.e. a matrix of {R, 1} or {1, C} dimensions, or should I update my implementation to create a new Vector class based off an array?

That's true and there are a few reasons because of which we need a specialized version of vector:

  1. we are trying to replace the previous implementation
  2. it gives more control over the construction
  3. the normal user expects to find a vector class.

I have one questions for you why use the vector of vector?

I was comfortable with vectors. Upon deeper thought, a multidimentional-array based implementation would have worked better. I'll update my code to use the same!

why do you even need multidimensional arrays? Please look at the tensor_core, Eigen or any other high quilty library and see how it handles the matrix or tensor.

Laxman Desai
@relaxxpls

@amitsingh19975

why do you even need multidimensional arrays? Please look at the tensor_core, Eigen or any other high quilty library and see how it handles the matrix or tensor.

Oh I understand, but what added benefits does A[i + C*j] give over something like A[i][j]?
I'll create a layout parameter too then, and go for a 1D array with A[i + x*j] where x = R or C according to the user wanting row major or column major.

Kannav Mehta
@exclowd
One possible betterment can be rather than holding an array of pointers you can have one std::unique_ptr to the entire matrix. The array/container elements would be contiguous in memory in any case.
Kannav Mehta
@exclowd

@amitsingh19975

Yes, there are two things that missing:

  1. Vector implementation

A Vector would just be a column or row of a matrix right? I.e. a matrix of {R, 1} or {1, C} dimensions, or should I update my implementation to create a new Vector class based off an array?

That's true and there are a few reasons because of which we need a specialized version of vector:

  1. we are trying to replace the previous implementation
  2. it gives more control over the construction
  3. the normal user expects to find a vector class.

I have one questions for you why use the vector of vector?

I was comfortable with vectors. Upon deeper thought, a multidimentional-array based implementation would have worked better. I'll update my code to use the same!

why do you even need multidimensional arrays? Please look at the tensor_core, Eigen or any other high quilty library and see how it handles the matrix or tensor.

Can there be two types for row vector and column vector? have the user customize the vector class via template arguments. It would give the user a much more explicit notation.

amitsingh19975
@amitsingh19975

@amitsingh19975

why do you even need multidimensional arrays? Please look at the tensor_core, Eigen or any other high quilty library and see how it handles the matrix or tensor.

Oh I understand, but what added benefits does A[i + C*j] give over something like A[i][j]

  1. with the A[i][j] you restricted with a particular layout and in C++ you will be stuck with row-major.
  2. if you need to extend for more dimensions, you will need to specify the dimension in advance, which is impossible for higher dimensions like a tensor.
  3. with the A[i + C*j] you know they are contiguous in memory and pointed by a single pointer, not the pointer of pointers, you can pass them around without incurring performance loss.
  4. and also compiler can help optimize the code.

@abakfja

Can there be two types for row vector and column vector? have the user customize the vector class via template arguments. It would give the user a much more explicit notation.

No need for two different types, we can use layout for example

auto row_vector = Vector<float, layout::row_major>(...);
auto col_vector = Vector<float, layout::col_major>(...);

you could something like this.

Kannav Mehta
@exclowd

@amitsingh19975

why do you even need multidimensional arrays? Please look at the tensor_core, Eigen or any other high quilty library and see how it handles the matrix or tensor.

Oh I understand, but what added benefits does A[i + C*j] give over something like A[i][j]

  1. with the A[i][j] you restricted with a particular layout and in C++ you will be stuck with row-major.
  2. if you need to extend for more dimensions, you will need to specify the dimension in advance, which is impossible for higher dimensions like a tensor.
  3. with the A[i + C*j] you know they are contiguous in memory and pointed by a single pointer, not the pointer of pointers, you can pass them around without incurring performance loss.
  4. and also compiler can help optimize the code.

Sure, can we use the existing layouts(boost::numeric::ublas::column_major and boost::numeric::ublas::row_major) in the competency test? In the implementation we would be specializing tensor_core which already has layout defined.

amitsingh19975
@amitsingh19975
  1. with the A[i + C*j] you know they are contiguous in memory and pointed by a single pointer, not the pointer of pointers, you can pass them around without incurring performance loss.
The performance loss is due following pointers.
amitsingh19975
@amitsingh19975
For me, in a competency test, you shouldn't use tensor_core, but you can use the layouts defined by the boost because most of the operations are defined for the tensor, and there won't be much left to show your knowledge. If @bassoy beg to differ, then you can use it as he is the guy who has given the test.
Kannav Mehta
@exclowd

For me, in a competency test, you shouldn't use tensor_core, but you can use the layouts defined by the boost because most of the operations are defined for the tensor, and there won't be much left to show your knowledge. If @bassoy beg to differ, then you can use it as he is the guy who has given the test.

I will not use tensor_core in the competency test, by implementation I meant the actual project period.

amitsingh19975
@amitsingh19975
yep.
abhishekkranjan
@abhishekkranjan
Hello everyone, I am Abhishek Ranjan, a Computer Science and Engineering student from SJB Institute of Technology(India). I wanted to contribute to open-source platforms. I was fascinated by " Project 2: Create a new matrix and vector types" and want to contribute to it. I do have experience with c++/c and I have a good understanding of Data Structures and Algorithms as am good at competitive programming. Looking forward to working with Boost for a long time.
Ayush Paliwal
@ayushvpaliwal
Hello everyone,
I am Ayush Paliwal, a third-year student at the Indian Institute of Technology, Varanasi, India. I would like to do this year GSoC with Boost uBlas.
I have completed the given competency test. So, I request the mentors to review it.
amitsingh19975
@amitsingh19975
@ayushvpaliwal, DM me the link here or email me using amitsingh19975@gmail.com.
amitsingh19975
@amitsingh19975
@ayushvpaliwal, you have not forked the Boost.uBLAS, is there a reason for it? Once you have forked the project and implemented the matrix, write the unit test using the boost unit test library in the test folder. After you are done with it, revert to me then I have a few questions for you.
Cem Bassoy
@bassoy
For newcomers and GSoC applicants, go through the recommendations posted on Jan 30.
there is no requirement to use the tensor_core.
shadymohamedamin
@shadymohamedamin
I implemented the given competency test. So, I request the mentors to review it. @bassoy @amitsingh19975
amitsingh19975
@amitsingh19975

I implemented the given competency test. So, I request the mentors to review it. @bassoy @amitsingh19975

@shadymohamedamin, please go through the competency test again and follow the instructions. You need to create classes for matrix and vector, not hard-coding them.

shadymohamedamin
@shadymohamedamin
i see the instructions but i didnt understand this step well A = zeros(3,2); this require me to implement method of class and build matrix then filled it with zeros ?
shadymohamedamin
@shadymohamedamin
in this code i understand that he have two matrix Q and R .......and he want to filled them with zeros then he want to multiply them and store them in matrix A
this explain is right ?
shadymohamedamin
@shadymohamedamin
i did this step which create matrix folder and file which name is matrix.cpp to implement
this step is right ?
Cem Bassoy
@bassoy
@shadymohamedamin this is a competency test. we cannot give you hints how to solve it. please prepare your solution and tell us when you are finished with your proposal and competency test.
Cem Bassoy
@bassoy
@abhishekkranjan
thanks for considering uBLAS. you have the competency test description. prepare your solution and ping me when you are finished with your competency test. we will evaluate it and come back to you. Please read my comments posted on Jan 30 before you start your competency test.
Manan Sharma
@manan180796
Hi This is Manan Sharma, A Computer Science Student in IIIT Hyderbad, India. I want to contribute to boost and am interested in Project 1 "Finalize and improve the subtensor type". I have a good experience of c/c++/c++17 also have a good understanding of algorithms and datastructures .
Vishal Singh
@vishalMCE
Dear Mentor correct me if I wrong,tensoris a mathematics topic and The code of tensoris written inside tensor_core.hppand many other header files .
amitsingh19975
@amitsingh19975

Dear Mentor correct me if I wrong,tensoris a mathematics topic and The code of tensoris written inside tensor_core.hppand many other header files .

Yes, isn't the matrix and vectors, though? I see matrix and vectors as the tensor's specialisation, and some will say the tensor is the extensions of vectors and the matrix into higher dimensions.

Vishal Singh
@vishalMCE
@amitsingh19975 Understood
Kannav Mehta
@exclowd

@amitsingh19975 @bassoy I had a few doubts while drafting the proposal for the GSoC Application.

  • Since the second part of the implementation of matrix and vector types, i.e submatrix and subvector is dependent on the first project. Can I draft a proposal to work on the combination of these two projects into one.
  • If so what would the ideal order be like? For me it seems a preliminary implementation of matrix and vector based as an extension of tensor would not be that time consuming so beginning with that I can move towards working on the subtensor and come back to implement submatrix and subvector. Although doing subtensor first and then doing the complete matrix and vector along with their "sub" counterparts can also be a choice.
  • Another part I am not sure is the allocation of timeline. How much accurate should the timeline for the project be? in case of unexpected roadblocks etc.?

Thanks in Advance.

Manan Sharma
@manan180796
I have completed the given competency test. So, I request the mentors to kindly review the same
Cem Bassoy
@bassoy
Dear uBlas community,
I am happy to announce that our GSoC students have successfully passed GSoC.
Both had an impactful contribution and showed great efforts to finalize their projects.
Congrats @exclowd and @shikharvashistha!
If you are interested in their projects, this is their wiki with project description.
amitsingh19975
@amitsingh19975

@bassoy, I've created a new branch "fix/extents" to fix the existing problem with the ambiguous extents. My approach would be making the extents to be at least of 2nd order. Therefore, we can discern between static tensor and static rank tensor.

auto e0 = extents<1>{}; // [static rank extents] invalid because of 1st order static rank extents
auto e1 = extents<1,2>{}; // [static extents] valid because of 2st order static extents
auto e2 = extents<2>{}; // [static rank extents] valid because of 2st order static rank extents
auto e3 = extents<>{4}; // [dynamic extents] invalid because of 1st order dynamic extents
auto e4 = extents<>{4,4}; // [dynamic extents] valid because of 2st order dynamic extents

Order(Static Extents|Dynamic Extents) > 1 and Order(Static Rank Extents) == 1. Therefore, there is no ambiguity.

amitsingh19975
@amitsingh19975

@bassoy, there's one problem here, and I don't know which solution is better.

  • should we put an invariant on static rank extents where the minimum order should be greater than one and lose the ability to alias the tensor into vector.
  • should we make an exception for static rank extents and keep the aliasing ability.

There's one downside of alias on clang right now: they haven't implemented the type deduction for alias type. This makes it impossible to deduce the template types from the constructor.

Neel-Shah-29
@Neel-Shah-29
Hello I am Neel Shah an undergraduate student at VJTI computer engg and wants to contribute in ublas.Dear mentor I have open a pull request for the issue 129 kindly review it
Harjot Singh
@Harjot20022001
Hi everyone! I need some help. I also posted this here https://github.com/boostorg/ublas/discussions/148 but nobody gave a reply and it's been quite a while since I posted it there.
I tried to use the example given in https://github.com/boostorg/ublas#simple-example and I'm getting bugs on my system. The keywords 'index','tenson_dynamics' and 'ones' are unrecognized. Is it a bug or anything else?
amitsingh19975
@amitsingh19975
Hi @Harjot20022001, I think you are either messing up namespace or unable to include tensor header file.
amitsingh19975
@amitsingh19975
Maybe you're using master branch of ublas. This feature is in develop branch right now.
10 replies
Cem Bassoy
@bassoy
@amitsingh19975 could you move your discussion into the discussions page, so we can discuss your design approach. thanks.
Cem Bassoy
@bassoy
@Neel-Shah-29 thanks for contributing. we will have a look at it. please better formulate your pull request comment https://github.com/boostorg/ublas/pull/151#issue-1105064528
@amitsingh19975 thanks for pointing this out. boostorg/ublas#150
amitsingh19975
@amitsingh19975
Hi @bassoy, and welcome back. I will do it by tomorrow.
Neel-Shah-29
@Neel-Shah-29
@bassoy and @amitsingh19975 i tried to contribute on that boostorg/ublas#150 . Please have a look at it. Also i am interested in contributing in other good first issues if there are any . So please suggest some issue on which currently efforts are not going on.Thanks a lot and looking forward to contribute in ublas in future as well.
amitsingh19975
@amitsingh19975
@bassoy, I have created the discussion for the issue of the extent.
amitsingh19975
@amitsingh19975
@Neel-Shah-29, please look at the pull request, and provide the trailing return type to each lambda, even if it returns nothing with void. Please, run the test on the local machine before pushing.
14 replies
Harjot Singh
@Harjot20022001

Maybe you're using master branch of ublas. This feature is in develop branch right now.

Sir, how to use the develop branch?

yashdabhade1
@yashdabhade1
hello , i am using boost ublas as a part of my code.
but since yesterday i am unable to open its documentation online