FasTensor  1.0.0
Transform Supercomputing for AI
Functions | Variables
ft_example_reduce2D_1f1p.cpp File Reference
#include <iostream>
#include <stdarg.h>
#include <vector>
#include <stdlib.h>
#include "ft.h"

Functions

Stencil< float > udf_hist_2d (const Stencil< float > &iStencil)
 
int main (int argc, char *argv[])
 

Variables

std::vector< unsigned long long > H_size = {8, 2}
 Example to sum each row of A (8 x 8) Store result in H (8 x 2) H[0,0] = sum (A[0,0], A[0,1], A[0,2], A[0,3])
H[0,1] = sum (A[0,4], A[0,5], A[0,6], A[0,7])
H[1,0] = sum (A[1,0], A[1,1], A[1,2], A[1,3]) ... ... More...
 
Array< float > * H
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ udf_hist_2d()

Stencil<float> udf_hist_2d ( const Stencil< float > &  iStencil)
inline

Variable Documentation

◆ H

Array<float>* H

◆ H_size

std::vector<unsigned long long> H_size = {8, 2}

Example to sum each row of A (8 x 8) Store result in H (8 x 2) H[0,0] = sum (A[0,0], A[0,1], A[0,2], A[0,3])
H[0,1] = sum (A[0,4], A[0,5], A[0,6], A[0,7])
H[1,0] = sum (A[1,0], A[1,1], A[1,2], A[1,3]) ... ...

A points to a list of files and each have size of 8 x 8.

Examples
ft_example_reduce2D_1f1p.cpp.