Code Monkey home page Code Monkey logo

Comments (8)

hakttari avatar hakttari commented on May 18, 2024

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);

from arrayfire.

9prady9 avatar 9prady9 commented on May 18, 2024

@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

from arrayfire.

shehzan10 avatar shehzan10 commented on May 18, 2024

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);

from arrayfire.

umar456 avatar umar456 commented on May 18, 2024

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 [email protected]
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).

from arrayfire.

pavanky avatar pavanky commented on May 18, 2024

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.

from arrayfire.

umar456 avatar umar456 commented on May 18, 2024

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 [email protected]
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).

from arrayfire.

pavanky avatar pavanky commented on May 18, 2024

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

from arrayfire.

pavanky avatar pavanky commented on May 18, 2024

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

from arrayfire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.