/*
 * Copyright (c) 2020-2022, NVIDIA CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#include <cstdint>

namespace cugraph::ops::gnn {

/**
 * @brief Computes the fast-integer division magic numbers for a bunch of
 *        divisors
 *
 * @param[out] p      the `p` factor for a fast-int-div operation [on device]
 *                    [len = `max_val`]
 * @param[out] m      the `m` factor for a fast-int-div operation [on device]
 *                    [len = `max_val`]
 * @param[in] max_val all divisors starting from 1 till this number (included)
 *                    will have their corresponding magic numbers computed in
 *                    the above mentioned arrays
 * @param[in] stream  cuda stream where to schedule the final copy over to the
 *                    above device arrays
 *
 * @{
 */
void precomp_fast_int_div(int32_t* p, int32_t* m, int32_t max_val, cudaStream_t stream);
void precomp_fast_int_div(int64_t* p, int64_t* m, int64_t max_val, cudaStream_t stream);
void precomp_fast_int_div(uint32_t* p, uint32_t* m, uint32_t max_val, cudaStream_t stream);
void precomp_fast_int_div(uint64_t* p, uint64_t* m, uint64_t max_val, cudaStream_t stream);
/** @} */

}  // namespace cugraph::ops::gnn
