Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create seq class for C++ API #51

Closed
shehzan10 opened this issue Nov 6, 2014 · 8 comments · Fixed by #48
Closed

Create seq class for C++ API #51

shehzan10 opened this issue Nov 6, 2014 · 8 comments · Fixed by #48
Assignees
Labels
Milestone

Comments

@shehzan10
Copy link
Member

Implement seq class for C++ API. Move C-API seq to af_seq.
Implement span and end.
Refactor code from v2.1.

@shehzan10 shehzan10 self-assigned this Nov 6, 2014
@shehzan10 shehzan10 mentioned this issue Nov 6, 2014
Merged
@pavanky pavanky modified the milestone: 3.0.A1 Nov 11, 2014
@hakttari
Copy link

Hello,
The following code is working with AF 2.0, but it makes an error in AF 3.0. How can I implement af::seq with arrayfire open source library?

int m = 5;
array i = seq(m);

@9prady9
Copy link
Member

9prady9 commented Dec 19, 2014

@hakttari I think we missed this functionality during the code refactor. I have created an feature request for this. You can follow up on progress here

@shehzan10
Copy link
Member Author

This functionality is replaced by iota. The function definition are shown below.
The rep argument allows a repetition dimension to be chosen.

AFAPI array iota(const dim4 &dims, const unsigned rep = 3, af_dtype ty=f32);
    AFAPI array iota(const dim_type d0, const unsigned rep = 0, af_dtype ty=f32);
    AFAPI array iota(const dim_type d0, const dim_type d1,
                     const unsigned rep = 1, af_dtype ty=f32);
    AFAPI array iota(const dim_type d0, const dim_type d1, const dim_type d2,
                     const unsigned rep = 2, af_dtype ty=f32);
    AFAPI array iota(const dim_type d0, const dim_type d1, const dim_type d2,
                     const dim_type d3, const unsigned rep = 3, af_dtype ty=f32);

@umar456
Copy link
Member

umar456 commented Dec 19, 2014

What's the point of taking it out? Why shouldn't we put it back in?

Sent from my iPhone

On Dec 18, 2014, at 11:52 PM, Shehzan Mohammed notifications@github.com
wrote:

This functionality is replaced by iota. The function definition are shown
below.
The rep argument allows a repetition dimension to be chosen.

AFAPI array iota(const dim4 &dims, const unsigned rep = 3, af_dtype ty=f32);
AFAPI array iota(const dim_type d0, const unsigned rep = 0,
af_dtype ty=f32);
AFAPI array iota(const dim_type d0, const dim_type d1,
const unsigned rep = 1, af_dtype ty=f32);
AFAPI array iota(const dim_type d0, const dim_type d1, const dim_type d2,
const unsigned rep = 2, af_dtype ty=f32);
AFAPI array iota(const dim_type d0, const dim_type d1, const dim_type d2,
const dim_type d3, const unsigned rep = 3,
af_dtype ty=f32);


Reply to this email directly or view it on GitHub
#51 (comment).

@pavanky
Copy link
Member

pavanky commented Dec 19, 2014

iota is more complete than seq. We can have a wrapper for this particular operation, but ideally I'd prefer if we forced the usage iota as opposed to seq.

@umar456
Copy link
Member

umar456 commented Dec 19, 2014

We shouldn't break things unless there is a good reason.

Sent from my iPhone

On Dec 18, 2014, at 11:57 PM, Pavan Yalamanchili notifications@github.com
wrote:

iota is more complete than seq. We can have a wrapper for this particular
operation, but ideally I'd prefer if we forced the usage iota as opposed to
seq.


Reply to this email directly or view it on GitHub
#51 (comment).

@pavanky
Copy link
Member

pavanky commented Dec 19, 2014

@shehzan10 Can you create a wrapper for this to use iota internally ?

@pavanky pavanky reopened this Dec 19, 2014
@pavanky pavanky closed this as completed Dec 19, 2014
@pavanky
Copy link
Member

pavanky commented Dec 19, 2014

@hakttari This has been added to the current devel branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants