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

Add support for xt::xtensor_fixed and elemental access #24

Merged
merged 5 commits into from
Dec 19, 2023

Conversation

czgdp1807
Copy link
Collaborator

@czgdp1807 czgdp1807 commented Dec 19, 2023

#12

Test I am working on,

#include <iostream>
#include <xtensor/xfixed.hpp>
#include "xtensor/xio.hpp"
#include "xtensor/xview.hpp"

int main() {

    xt::xtensor_fixed<double, xt::xshape<3, 3>> arr1;
    xt::xtensor<double, 1> arr2 {5.0, 6.0, 7.0};
    xt::xtensor_fixed<double, xt::xshape<3>> result;

    for( int i = 0; i < 3; i++ ) {
        for( int j = 0; j < 3; j++ ) {
            arr1(i, j) = i*3 + j;
        }
    }

    std::cout << arr1 << arr2 << std::endl;
    result = xt::view(arr1, 1) + arr2;
    std::cout << result << std::endl;

    return 0;
}

@czgdp1807 czgdp1807 marked this pull request as ready for review December 19, 2023 19:43
@czgdp1807 czgdp1807 merged commit 3f2b43d into lcompilers:main Dec 19, 2023
2 checks passed
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.

1 participant