Skip to content

Commit

Permalink
Remove builtins meant for BlackScholes demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kchristin22 committed Nov 15, 2024
1 parent a8067ba commit e234396
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions include/clad/Differentiator/BuiltinDerivatives.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,28 +386,6 @@ inline void free_pushforward(void* ptr, void* d_ptr) {
// NOLINTEND(cppcoreguidelines-owning-memory)
// NOLINTEND(cppcoreguidelines-no-malloc)

CUDA_HOST_DEVICE inline void expf_pullback(float a, float d_y, float* d_a) {
*d_a += expf(a) * d_y;
}

CUDA_HOST_DEVICE inline void fabsf_pullback(float a, float d_y, float* d_a) {
*d_a += (a >= 0) ? d_y : -d_y;
}

CUDA_HOST_DEVICE inline void logf_pullback(float a, float d_y, float* d_a) {
*d_a += (1.F / a) * d_y;
}

CUDA_HOST_DEVICE inline void fdividef_pullback(float a, float b, float d_y,
float* d_a, float* d_b) {
*d_a += (1.F / b) * d_y;
*d_b += (-a / (b * b)) * d_y;
}

CUDA_HOST_DEVICE inline void sqrtf_pullback(float a, float d_y, float* d_a) {
*d_a += (1.F / (2.F * sqrtf(a))) * d_y;
}

// These are required because C variants of mathematical functions are
// defined in global namespace.
using std::abs_pushforward;
Expand Down

0 comments on commit e234396

Please sign in to comment.