Created
February 12, 2015 05:37
-
-
Save jdswinbank/26a7eadfad7354eaf9df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "ndarray.h" | |
using namespace std; | |
int main(void) { | |
int height = 3968; | |
int width = 9; | |
int nSwaths = 15; ndarray::Array<float, 3, 2> slitFuncsSwaths = ndarray::allocate(height, width, nSwaths); | |
cout << "slitFuncsSwaths.getShape() = " << slitFuncsSwaths.getShape() << endl; | |
cout << "slitFuncsSwaths.getShape()[0] = " << slitFuncsSwaths.getShape()[0] | |
<< ", slitFuncsSwaths.getShape()[1] = " << slitFuncsSwaths.getShape()[1] | |
<< ", slitFuncsSwaths.getShape()[2] = " << slitFuncsSwaths.getShape()[2] << endl; | |
cout << "slitFuncsSwaths[view(0)()(0) = " << slitFuncsSwaths[ndarray::view(0)()(0)] << endl; | |
cout << "slitFuncsSwaths[view(0)(0,9)(0) = " | |
<< slitFuncsSwaths[ndarray::view(0)(0,slitFuncsSwaths.getShape()[1])(0)] << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment