# Question about the torch.\_C code

**URL:** <https://discuss.pytorch.org/t/question-about-the-torch-c-code/16810>\
**Category:** Uncategorized\
**Created:** [April 23, 2018, 1:28am UTC](https://discuss.pytorch.org/t/question-about-the-torch-c-code/16810 "2018-04-23T01:28:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alpha](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alpha/32/25271_2.png) [@Alpha](https://discuss.pytorch.org/u/Alpha)\
**Post date:** [April 23, 2018, 1:28am UTC](https://discuss.pytorch.org/t/question-about-the-torch-c-code/16810/1 "2018-04-23T01:28:15Z")

</div>

Hi,

the C code [here](https://github.com/pytorch/pytorch/blob/949559552004db317bc5ca53d67f2c62a54383f5/aten/src/THNN/generic/SpatialDilatedMaxPooling.c#L5) ,

```auto
static inline void THNN_(SpatialDilatedMaxPooling_shapeCheck)(
	THTensor *input, THTensor *gradOutput, THIndexTensor *indices,
	int kH, int kW, int dH, int dW, int padH, int padW,
	int dilationH, int dilationW, bool ceil_mode) {

```

Is the **THNN\_(SpatialDilatedMaxPooling\_shapeCheck)** correspond to some function name?

And if so, how can I find the real name of the **THNN\_(SpatialDilatedMaxPooling\_shapeCheck)**?

Thank you!

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [April 23, 2018, 9:17am UTC](https://discuss.pytorch.org/t/question-about-the-torch-c-code/16810/2 "2018-04-23T09:17:47Z")

</div>

Hi,

This is heavily C code with a lot of macros. You can read [this post](https://apaszke.github.io/torch-internals.html) for more details on how these macros are expanded. Most of the discution is about `TH` but `THNN` works exactly the same way.

---

<div class="post-metadata">

**Author:** ![Alpha](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alpha/32/25271_2.png) [@Alpha](https://discuss.pytorch.org/u/Alpha)\
**Post date:** [April 23, 2018, 11:49am UTC](https://discuss.pytorch.org/t/question-about-the-torch-c-code/16810/3 "2018-04-23T11:49:01Z")

</div>

Thank you very much!
