[core.ADT.tensor] Add 'num_elements' function (#217)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 16 May 2018 23:45:55 +0000 (08:45 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 16 May 2018 23:45:55 +0000 (08:45 +0900)
commit321a796bae9baecf182a57f65f276ab8866a611b
tree070ffabb7b79809a72b250ad2e398d4333021780
parentbe48e2c2b1e94eddfbe4ca084679ea5a976a40b9
[core.ADT.tensor] Add 'num_elements' function (#217)

* [core.ADT.tensor] Add 'num_elements' function

This commit adds 'num_elemnets' function which takes a tensor shape and
returns the number of elements in a tensor of the given shape.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
* Return 0 when null dimension exists
libs/core/include/nncc/core/ADT/tensor/Shape.h
libs/core/src/nncc/core/ADT/tensor/Shape.cpp
libs/core/src/nncc/core/ADT/tensor/Shape.test.cpp