We use the same strategy for generating code in the source files for the headers. In `csrc/Tensor.h`, we do the following:
```cpp
#include "generic/Tensor.h"
#include <TH/THGenerateAllTypes.h>

#include "generic/Tensor.h"
#include <TH/THGenerateHalfType.h>

This has the same effect, where we draw in the code from the generic header, wrapped with the same macro definitions, for each type. The only difference is that the resulting code is contained all within the same header file, as opposed to being split into multiple source files.
Lastly, we need to consider how we "convert" or "substitute" the function types. If we look in the same header file, we see a bunch of #define statements, including:
#define THPTensor_(NAME)            TH_CONCAT_4(THP,Real,Tensor_,NAME)
