-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cppkg update, renames, and age generalization (#26)
* renames, cleanups, and updates * update cppkg version * make age opmap more general * separate type conversion from opera * update docs
- Loading branch information
1 parent
2d29920
commit 7e5cdca
Showing
149 changed files
with
1,729 additions
and
615 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#include "ade/funcarg.hpp" | ||
|
||
#ifdef ADE_FUNCARG_HPP | ||
|
||
namespace ade | ||
{ | ||
|
||
FuncArg identity_map (TensptrT tensor) | ||
{ | ||
return FuncArg(tensor, identity); | ||
} | ||
|
||
FuncArg reduce_1d_map (TensptrT tensor, uint8_t rank) | ||
{ | ||
Shape shape = tensor->shape(); | ||
std::vector<DimT> indices(rank_cap); | ||
auto bt = indices.begin(); | ||
auto it = bt + rank; | ||
std::iota(bt, it, 0); | ||
std::iota(it, indices.end(), rank + 1); | ||
indices[rank_cap - 1] = rank; | ||
return FuncArg(tensor, CoordptrT( | ||
reduce(rank, {shape.at(rank)})-> | ||
connect(*permute(indices)))); | ||
} | ||
|
||
FuncArg reduce_map (TensptrT tensor, uint8_t rank, std::vector<DimT> red) | ||
{ | ||
return FuncArg(tensor, reduce(rank, red)); | ||
} | ||
|
||
FuncArg extend_map (TensptrT tensor, uint8_t rank, std::vector<DimT> ext) | ||
{ | ||
return FuncArg(tensor, extend(rank, ext)); | ||
} | ||
|
||
FuncArg permute_map (TensptrT tensor, std::vector<uint8_t> order) | ||
{ | ||
return FuncArg(tensor, permute(order)); | ||
} | ||
|
||
FuncArg flip_map (TensptrT tensor, uint8_t dim) | ||
{ | ||
return FuncArg(tensor, flip(dim)); | ||
} | ||
|
||
} | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.