Git Product home page Git Product logo

armneonoptimization's Introduction

armneonoptimization's People

Contributors

ldpe2g avatar zchrissirhcz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

armneonoptimization's Issues

[armAssembly] compile error for inline assembler

Hi Depeng

从你的知乎文章 移动端arm cpu优化学习笔记第4弹--内联汇编入门 看过来的。

我的NDK版本是r21b,代码不修改的情况下,内联汇编最后一部分有编译报错,原因是同一个变量,既作为 输入 也作为 输出。我找到的修改方法是,只在 output 部分传入,并且将=r修改为+r

例如rgb转gray的:

        :[src]        "=r"(src),
         [dst]        "=r"(dst),
         [neonLen]    "=r"(neonLen)
        :[src]        "0"(src),
         [dst]        "1"(dst),
         [neonLen]    "2"(neonLen)
        :"cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11", "v12", "v13"

改为如下:

        :[src]        "+r"(src),
         [dst]        "+r"(dst),
         [neonLen]    "+r"(neonLen)
        :
        :"cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11", "v12", "v13"

Result seems off in my side

My run produces (left: input; middle: my implementation; right: this implementation; radius=10):
noisy_square

Can you try this input? It's a 201x201 FP32 square, stored with little-endian:
noisy-square.tar.gz

I use this routine to read the file:

template<typename T>
std::vector<T> read_raw(const std::string &path, bool little_endian = false)
{
    std::ifstream file(path, std::ifstream::binary);
    std::streamsize buffer_size = 1 << 20;
    char buffer[buffer_size];
    std::vector<T> raw;
    while(!file.eof())
    {
        file.read(buffer, buffer_size);
        for (int i = 0; i < std::min(buffer_size, file.gcount()); i += sizeof(T))
        {
            char *begin = &buffer[i];
            if (little_endian)
                std::reverse(begin, begin + sizeof(T));
            raw.push_back(*(T *)begin);
        }
    }
    file.close();
    return raw;
}

Thank you.

关于arm neon的调试

请问大佬, 有办法对进行arm neon代码进行单步调试吗?或者开发的时候 如何去debug,arm neon汇编或者intrinsic

关于boxFilter的测试

求问为啥后面的neon指令看上去并没有加速很多?这里面的原因是为啥?

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.