## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Transform tensor

Transform tensor to a fiber direction.

    template <typename T, int transpose>
    inline __host__ __device__ void transform_tensor(T* s, T* r, T* b)

> Note: This function requires specification of the template parameter `typename T` and `int transpose`.

## Parameters

#### `s`

- Input: Tensor to be transformed

#### `r`

- Input: fiber direction

#### `b`

- Output: Transformed tensor